forge/.github/workflows/deploy-docs.yml
Jacob Schmidt 827f3303a2 feat: add initial Docus setup and sync tool for documentation generation
- Created package.json for Docus with necessary scripts and dependencies.
- Implemented sync-docus-docs.mjs to automate the generation of documentation files from source markdown.
- Defined mappings for generated pages and virtual routes to ensure proper linking in documentation.
- Added static content files for the documentation structure, including navigation and index pages.
2026-04-21 16:07:27 -05:00

61 lines
1.4 KiB
YAML

name: Deploy Docs
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: github-pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: docus/package-lock.json
- name: Install docs dependencies
run: npm ci --prefix docus
- name: Generate docs content
run: node tools/sync-docus-docs.mjs
- name: Build static docs
run: npm run build --prefix docus
env:
DOCS_BASE_URL: /${{ github.event.repository.name }}/
DOCS_SITE_URL: https://${{ github.repository_owner }}.github.io
DOCS_REPO_URL: https://github.com/${{ github.repository }}
DOCS_REPO_BRANCH: ${{ github.ref_name }}
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docus/.output/public
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4