Skip to content

Commit

Permalink
Update netlify deploy action (avoid warning for Node 16). Use variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-heyer committed Jun 5, 2024
1 parent d28a88e commit ced8e41
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/deploy-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ jobs:
cache: "npm"
cache-dependency-path: "package-lock.json"
env:
NODE_ENV: ${{ secrets.NODE_ENV }}
NODE_ENV: ${{ vars.NODE_ENV }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Install dependencies
run: |
npm run presetup
npm ci --ignore-scripts
env:
NODE_ENV: ${{ secrets.NODE_ENV }}
NODE_ENV: ${{ vars.NODE_ENV }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Run NPM install scripts
Expand Down Expand Up @@ -81,17 +81,18 @@ jobs:
run: npm run build
env:
APP_ENV: staging
NODE_ENV: ${{ secrets.NODE_ENV }}
NODE_ENV: ${{ vars.NODE_ENV }}
NODE_OPTIONS: --max-old-space-size=4096
FATHOM_SITE_ID: ${{ vars.FATHOM_SITE_ID }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_SEARCH_ONLY_KEY: ${{ vars.ALGOLIA_SEARCH_ONLY_KEY }}
ALGOLIA_APP_ID: ${{ vars.ALGOLIA_APP_ID }}
ALGOLIA_INDEX_NAME: edb-docs-staging
INDEX_ON_BUILD: true

- name: Deploy to Netlify
id: netlify-deploy
uses: nwtgck/actions-netlify@v2
uses: nwtgck/actions-netlify@v3
with:
publish-dir: "./public"
production-branch: "develop"
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/deploy-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,18 @@ jobs:
run: npm run build
env:
APP_ENV: staging
NODE_ENV: ${{ secrets.NODE_ENV }}
NODE_ENV: ${{ vars.NODE_ENV }}
NODE_OPTIONS: --max-old-space-size=4096
FATHOM_SITE_ID: ${{ vars.FATHOM_SITE_ID }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_SEARCH_ONLY_KEY: ${{ vars.ALGOLIA_SEARCH_ONLY_KEY }}
ALGOLIA_APP_ID: ${{ vars.ALGOLIA_APP_ID }}
ALGOLIA_INDEX_NAME: edb-docs-staging
INDEX_ON_BUILD: false

- name: Deploy to Netlify
id: netlify-deploy
uses: nwtgck/actions-netlify@v2
uses: nwtgck/actions-netlify@v3
with:
publish-dir: "./public"
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/deploy-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ jobs:
cache: "npm"
cache-dependency-path: "package-lock.json"
env:
NODE_ENV: ${{ secrets.NODE_ENV }}
NODE_ENV: ${{ vars.NODE_ENV }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Install dependencies
run: |
npm run presetup
npm ci --ignore-scripts
env:
NODE_ENV: ${{ secrets.NODE_ENV }}
NODE_ENV: ${{ vars.NODE_ENV }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Run NPM install scripts
Expand Down Expand Up @@ -69,18 +69,19 @@ jobs:
run: npm run build
env:
APP_ENV: production
NODE_ENV: ${{ secrets.NODE_ENV }}
NODE_ENV: ${{ vars.NODE_ENV }}
NODE_OPTIONS: --max-old-space-size=4096
FATHOM_SITE_ID: ${{ vars.FATHOM_SITE_ID }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_SEARCH_ONLY_KEY: ${{ vars.ALGOLIA_SEARCH_ONLY_KEY }}
ALGOLIA_APP_ID: ${{ vars.ALGOLIA_APP_ID }}
ALGOLIA_INDEX_NAME: edb-docs
GTM_ID: GTM-5W8M67
INDEX_ON_BUILD: true

- name: Deploy to Netlify
id: netlify-deploy
uses: nwtgck/actions-netlify@v2
uses: nwtgck/actions-netlify@v3
with:
publish-dir: "./public"
production-branch: "main"
Expand Down

2 comments on commit ced8e41

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸŽ‰ Published on https://edb-docs.netlify.app as production
πŸš€ Deployed on https://6660f467239cf707a9d94ace--edb-docs.netlify.app

Please sign in to comment.