build: only publish tagged commits #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Documentation | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'docs/**' | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
documentation: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8.5.0 | |
run_install: false | |
- name: Setup PNPM Workspace | |
run: | | |
pnpm install | |
- name: Build Brocatel | |
run: | | |
pnpm build | |
- name: Test Brocatel | |
run: | | |
pnpm test | |
- name: Bundle Brocatel VM Runtime | |
run: | | |
pnpm bundle | |
- name: Setup PDM | |
uses: pdm-project/setup-pdm@v4 | |
- name: Install Sphinx dependencies | |
run: | | |
cd vm | |
pdm install | |
- name: Build VM Sphinx documentation | |
run: | | |
cd vm | |
source .venv/bin/activate | |
make doc | |
cp -r public ../docs/public/api | |
- name: Build VitePress | |
run: | | |
cd docs | |
pnpm docs:build | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: docs/.vitepress/dist | |
single-commit: true |