Skip to content

Commit

Permalink
docs: ensure it deploys to prod from main
Browse files Browse the repository at this point in the history
  • Loading branch information
chrissimon-au committed Nov 28, 2024
1 parent c5e8cea commit 5d9d0cd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/contextive-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- 'docs/web/**'
- '.github/workflows/contextive-docs.yml'

env:
BRANCH_NAME: ${{ github.ref_name }}

jobs:
docs:
Expand All @@ -28,7 +30,10 @@ jobs:

- run: npm run build

- run: npm run deploy
- run: |
prod_flag=""
if [ "$BRANCH_NAME" = "main" ]; then prod_flag="--prod"; fi
npm run deploy -- $prod_flag
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH: ${{ secrets.NETLIFY_AUTH }}

0 comments on commit 5d9d0cd

Please sign in to comment.