Skip to content

docs: add VitePress documentation site with GitHub Pages deployment #1

docs: add VitePress documentation site with GitHub Pages deployment

docs: add VitePress documentation site with GitHub Pages deployment #1

Workflow file for this run

name: Docs
on:
push:
branches:
- main
paths:
- 'website/**'
- '.github/workflows/docs.yml'
workflow_dispatch:
concurrency:
group: docs-Deploy
cancel-in-progress: true
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy:
runs-on: ubuntu-latest
environment: github-pages
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: website/package-lock.json
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Render capability tree SVG
working-directory: ${{ github.workspace }}
run: python scripts/render_feature_tree.py
- name: Copy SVG into website public assets
run: |
mkdir -p website/public/assets
cp docs/assets/har-skills-feature-tree.svg website/public/assets/har-skills-feature-tree.svg
- name: Install dependencies
working-directory: website
run: npm ci
- name: Build docs
working-directory: website
run: npm run docs:build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: website/.vitepress/dist
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4