Update Netlify workflow for documentation deployment (#15573)

This commit is contained in:
Adish M 2026-03-16 18:30:45 +05:30 committed by GitHub
commit 4d954d46f2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,8 +13,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
- name: Checkout documentation branch
uses: actions/checkout@v4
with:
ref: documentation
- name: Setup Node.js
uses: actions/setup-node@v4
@ -22,16 +24,17 @@ jobs:
node-version: 18.18.2
- name: Install dependencies
run: npm install
working-directory: docs
run: npm install
- name: Build the project
run: GTM=${{ secrets.GTM }} ALGOLIA_API_KEY=${{ secrets.ALGOLIA_API_KEY }} npm run build
working-directory: docs
run: |
GTM=${{ secrets.GTM }} ALGOLIA_API_KEY=${{ secrets.ALGOLIA_API_KEY }} npm run build
- name: Deploy to Netlify
run: |
npm install -g netlify-cli
netlify deploy --prod --dir=docs/build --auth=$NETLIFY_AUTH_TOKEN --site=${{ secrets.NETLIFY_SITE_ID }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
run: |
npm install -g netlify-cli
netlify deploy --prod --dir=docs/build --site=${{ secrets.NETLIFY_SITE_ID }}