Skip to content

Update deploy-staging.yml #46

Update deploy-staging.yml

Update deploy-staging.yml #46

# .github/workflows/deploy-staging.yml
name: Deploy Client (Staging)
on:
push:
branches:
- main
permissions:
contents: read
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install & build React client
working-directory: client
run: |
npm install # <— no lockfile needed
npm run build
- name: Deploy to GitHub Pages (staging)
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages-staging
folder: client/build
token: ${{ secrets.GITHUB_TOKEN }}