Skip to content

Enhance deployment script and documentation for GitHub Pages #1

Enhance deployment script and documentation for GitHub Pages

Enhance deployment script and documentation for GitHub Pages #1

Workflow file for this run

name: CI
on:
push:
branches: [src]
pull_request:
branches: [src]
workflow_dispatch:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x, 22.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install
run: npm ci
- name: Build
run: npm run build
deploy:
needs: build
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install
run: npm ci
- name: Build
run: npm run build
- name: Deploy to GitHub Pages (main)
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
publish_branch: main
force_orphan: true
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com