Skip to content

Commit

Permalink
Merge branch 'main' into sauce-visual-clip-element
Browse files Browse the repository at this point in the history
  • Loading branch information
kb-kerem authored Aug 29, 2024
2 parents c41aaf5 + f696960 commit 07d4156
Show file tree
Hide file tree
Showing 39 changed files with 3,540 additions and 11,080 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

31 changes: 0 additions & 31 deletions .eslintrc.json

This file was deleted.

40 changes: 14 additions & 26 deletions .github/workflows/deploy-pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ on:
- opened
- reopened
- synchronize
- closed
- closed
paths-ignore:
- '.github/**'
- '.docsearch/**'
- 'README.md'
- '.gitpod.yml'
Expand All @@ -27,40 +26,29 @@ jobs:
deploy-pr-preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: 18.x
- uses: actions/cache@v2
id: cache-build
with:
path: |
build
key: ${{ runner.os }}-${{ github.sha }}
- name: Checkout
uses: actions/checkout@v4

- uses: actions/cache@v2
id: cache-npm-packages
- name: Setup Node.js
uses: actions/setup-node@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
node-version-file: '.nvmrc'
cache: 'npm'

- name: Set preview path
- name: Set Preview Path
run: echo "PREVIEW_PATH=sauce-docs/pr-preview/pr-${{ github.event.number }}" >> "$GITHUB_ENV"

- name: Install Dependencies
if: steps.cache-npm-packages.outputs.cache-hit != 'true' && github.event.action != 'closed' # Skip if the PR was closed
if: github.event.action != 'closed' # Skip if the PR was closed
run: |
npm install
- name: Run Build
if: steps.cache-build.outputs.cache-hit != 'true' && github.event.action != 'closed' # Skip if the PR was closed
- name: Build
if: github.event.action != 'closed' # Skip if the PR was closed
run: |
npm run build
- name: Deploy PR preview
- name: Deploy PR
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./build/
source-dir: ./build/
6 changes: 3 additions & 3 deletions .github/workflows/deploy-to-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
deploy-dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Install Python
Expand All @@ -38,7 +38,7 @@ jobs:
project_id: ${{ secrets.RUN_PROJECT_DEV }}
service_account_key: ${{ secrets.RUN_SA_KEY_DEV }}

- uses: actions/cache@v2
- uses: actions/cache@v4
id: cache-build
with:
path: |
Expand Down
149 changes: 52 additions & 97 deletions .github/workflows/deploy-to-production.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Deploy to Production

on:
pull_request:
push:
branches:
- main
Expand All @@ -13,148 +12,104 @@ on:
workflow_dispatch:

env:
NO_INDEX: true
ALGOLIA_APP_ID: ${{secrets.ALGOLIA_APP_ID}}
ALGOLIA_KEY: ${{secrets.ALGOLIA_KEY}}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18.x

- uses: actions/cache@v2
id: cache-npm-packages
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}

- name: Install Dependencies
if: steps.cache-npm-packages.outputs.cache-hit != 'true'
run: |
npm install
- uses: actions/cache@v2
id: cache-build
with:
path: |
build
key: ${{ runner.os }}-${{ github.sha }}

- name: Run Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: |
npm run build
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}

jobs:
deploy-staging:
needs: build
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
env:
NO_INDEX: true

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v1
- name: Checkout
uses: actions/checkout@v4
with:
node-version: 18.x
- name: Install Python
uses: actions/setup-python@v2
fetch-depth: 0 # For correct author and date information on pages.

- name: Setup Node.js
uses: actions/setup-node@v4
with:
python-version: 3.7
- run: pip install crcmod
- name: Set up Cloud SDK
uses: 'google-github-actions/setup-gcloud@v0'
node-version-file: '.nvmrc'
cache: 'npm'

- name: Setup Python
uses: actions/setup-python@v5
with:
version: '290.0.1'
project_id: ${{ secrets.RUN_PROJECT }}
service_account_key: ${{ secrets.RUN_SA_KEY }}
python-version: '3.12'

- uses: actions/cache@v2
id: cache-build
- name: Google Cloud Login
uses: google-github-actions/auth@v2
with:
path: |
build
key: ${{ runner.os }}-${{ github.sha }}
credentials_json: '${{ secrets.RUN_SA_KEY }}'

- uses: actions/cache@v2
id: cache-npm-packages
- name: Setup Google Cloud SDK
uses: 'google-github-actions/setup-gcloud@v2'
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
project_id: ${{ secrets.RUN_PROJECT }}
env:
CLOUDSDK_PYTHON: ${{ env.pythonLocation }}/python

- name: Install Dependencies
if: steps.cache-npm-packages.outputs.cache-hit != 'true'
run: |
npm install
- name: Run Build
if: steps.cache-build.outputs.cache-hit != 'true'
- name: Build
run: |
npm run build
- name: Deploy to Bucket
- name: Deploy
working-directory: build
run: |-
cd build
gsutil -m rsync -R -d . ${{ secrets.GCS_BUCKET }}
deploy-production:
needs: deploy-staging
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
env:
NO_INDEX: false

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v1
- name: Checkout
uses: actions/checkout@v4
with:
node-version: 18.x
- name: Install Python
uses: actions/setup-python@v2
fetch-depth: 0 # For correct author and date information on pages.

- name: Setup Node.js
uses: actions/setup-node@v4
with:
python-version: 3.7
- run: pip install crcmod
- name: Set up Cloud SDK
uses: 'google-github-actions/setup-gcloud@v0'
node-version-file: '.nvmrc'
cache: 'npm'

- name: Setup Python
uses: actions/setup-python@v5
with:
version: '290.0.1'
project_id: ${{ secrets.RUN_PROJECT_PROD }}
service_account_key: ${{ secrets.RUN_SA_KEY_PROD }}
- uses: actions/cache@v2
id: cache-build
python-version: '3.12'

- name: Google Cloud Login
uses: google-github-actions/auth@v2
with:
path: |
build
key: ${{ runner.os }}-${{ github.sha }}
credentials_json: '${{ secrets.RUN_SA_KEY_PROD }}'

- uses: actions/cache@v2
id: cache-npm-packages
- name: Setup Google Cloud SDK
uses: 'google-github-actions/setup-gcloud@v2'
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
project_id: ${{ secrets.RUN_PROJECT_PROD }}
env:
CLOUDSDK_PYTHON: ${{ env.pythonLocation }}/python

- name: Install Dependencies
if: steps.cache-build.outputs.cache-hit != 'true'
run: |
npm install
- name: Run Build
if: steps.cache-build.outputs.cache-hit != 'true'
- name: Build
run: |
npm run build
- name: Deploy to Bucket
- name: Deploy
working-directory: build
run: |-
cd build
gsutil -m rsync -R -d . ${{ secrets.GCS_PROD_BUCKET }}
Loading

0 comments on commit 07d4156

Please sign in to comment.