Skip to content

Add CI workflow

Add CI workflow #2

Workflow file for this run

name: Build and deploy to GitHub Pages
on:
push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Pages
uses: actions/configure-pages@v5
- name: Install dependencies
run: npm ci
- name: Generate API reference
run: npm run gen-api
- name: Build docs
run: npm run build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./.vitepress/dist
deploy:
if: github.ref_name == github.event.repository.default_branch
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4