Skip to content

feat: add manual trigger to Netlify and GH Pages deployment workflows… #38

feat: add manual trigger to Netlify and GH Pages deployment workflows…

feat: add manual trigger to Netlify and GH Pages deployment workflows… #38

name: Staging → GitHub Pages
on:
push:
branches:
- dev
workflow_dispatch:
concurrency:
group: pages
cancel-in-progress: false
jobs:
test:
# Skip if push is from sync-main-to-dev bot (code already deployed to staging/GH-Pages & prod/Netlify)
if: github.actor != 'github-actions[bot]'
uses: ./.github/workflows/test.yml
build:
runs-on: ubuntu-latest
needs: [test]
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
env:
DEPLOY_TARGET: github-pages
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4