Skip to content

fix: change ./build directory to build branch and deploy gh-pages w… #1

fix: change ./build directory to build branch and deploy gh-pages w…

fix: change ./build directory to build branch and deploy gh-pages w… #1

Workflow file for this run

# Simple workflow for deploying static content to GitHub Pages
name: Build and commit to `build` branch
on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "build"
cancel-in-progress: false
jobs:
# Single deploy job since we're just deploying
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Node build
uses: actions/setup-node@v4
with:
node-version: 22
- run: |
npm ci --foreground-scripts
npm run build
ls -la ./
ls -laR ./build
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
# If you're changing the branch from main,
# also change the `main` in `refs/heads/main`
# below accordingly.
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
publish_branch: build # default: gh-pages
destination_dir: ./
enable_jekyll: true # do not write .nojekyll empty file