Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix deploy pipeline #2905

Merged
merged 4 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions .github/workflows/deploy-pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
- synchronize
- closed
paths-ignore:
- '.github/**'
- '.docsearch/**'
- 'README.md'
- '.gitpod.yml'
Expand All @@ -27,26 +26,32 @@ jobs:
deploy-pr-preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Checkout Repository
with:
fetch-depth: 0
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
name: Setup Node.js
with:
node-version: 18.x
- uses: actions/cache@v2
id: cache-build
with:
path: |
build
key: ${{ runner.os }}-${{ github.sha }}

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

- uses: actions/cache@v4
name: Cache Build
id: cache-build
with:
path: |
build
key: ${{ runner.os }}-${{ github.sha }}


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

Expand Down
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
62 changes: 38 additions & 24 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 @@ -21,14 +20,17 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Checkout Repository
with:
fetch-depth: 0
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
name: Setup Node.js
with:
node-version: 18.x

- uses: actions/cache@v2
- uses: actions/cache@v4
name: Cache NPM Packages
id: cache-npm-packages
with:
path: |
Expand All @@ -40,7 +42,8 @@ jobs:
run: |
npm install

- uses: actions/cache@v2
- uses: actions/cache@v4
name: Cache Build
id: cache-build
with:
path: |
Expand All @@ -58,38 +61,43 @@ jobs:
if: ${{ github.ref == 'refs/heads/main' }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
name: Checkout Repository
with:
fetch-depth: 0
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
name: Setup Node.js
with:
node-version: 18.x
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- run: pip install crcmod
name: Install crcmod
- name: Set up Cloud SDK
uses: 'google-github-actions/setup-gcloud@v0'
with:
version: '290.0.1'
project_id: ${{ secrets.RUN_PROJECT }}
service_account_key: ${{ secrets.RUN_SA_KEY }}

- uses: actions/cache@v2
id: cache-build
with:
path: |
build
key: ${{ runner.os }}-${{ github.sha }}

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

- uses: actions/cache@v4
name: Cache Build
id: cache-build
with:
path: |
build
key: ${{ runner.os }}-${{ github.sha }}

- name: Install Dependencies
if: steps.cache-npm-packages.outputs.cache-hit != 'true'
run: |
Expand All @@ -113,37 +121,43 @@ jobs:
NO_INDEX: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
name: Checkout Repository
with:
fetch-depth: 0
- uses: actions/setup-node@v1
- uses: actions/setup-node@v4
name: Setup Node.js
with:
node-version: 18.x
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- run: pip install crcmod
name: Install crcmod
- name: Set up Cloud SDK
uses: 'google-github-actions/setup-gcloud@v0'
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
with:
path: |
build
key: ${{ runner.os }}-${{ github.sha }}

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

- uses: actions/cache@v4
name: Cache Build
id: cache-build
with:
path: |
build
key: ${{ runner.os }}-${{ github.sha }}

- name: Install Dependencies
if: steps.cache-build.outputs.cache-hit != 'true'
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vale-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
name: runner / vale
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: errata-ai/vale-action@reviewdog
with:
reporter: github-pr-review
Expand Down