Skip to content

fix: improve workflow in GitHub Actions #2

fix: improve workflow in GitHub Actions

fix: improve workflow in GitHub Actions #2

Workflow file for this run

name: Build and Deploy Docs
on:
push:
branches: [main] # deploy docs only when pushing to main
workflow_dispatch: # allow manual trigger
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 9
run_install: true
- name: Build docs
run: pnpm run build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build