Skip to content

chore: fix ci/cd

chore: fix ci/cd #6

Workflow file for this run

name: Deploy Documentation
on:
push:
branches:
- main
paths:
- "docs-site/**"
- ".github/workflows/deploy-docs.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup PNPM
uses: pnpm/action-setup@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Setup Pages
uses: actions/configure-pages@v4
# Optional: silence ${NODE_AUTH_TOKEN} warnings on PRs
- name: Sanitize .npmrc on PRs
if: ${{ github.event_name == 'pull_request' }}
run: |
if [ -f .npmrc ]; then
sed -i 's#//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}##g' .npmrc || true
fi
- name: Install dependencies (docs workspace only)
run: pnpm install --frozen-lockfile --filter ./docs-site...
- name: Build with VitePress
working-directory: docs-site
run: pnpm build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs-site/.vitepress/dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4