-
Notifications
You must be signed in to change notification settings - Fork 14
40 lines (34 loc) · 944 Bytes
/
docs.yml
File metadata and controls
40 lines (34 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Build and Deploy Docs
on:
push:
branches: [main]
tags: ['v*']
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Parse version
id: version
run: |
if [[ "${{ github.ref_type }}" == "tag" ]]; then
# Parse the major version
TAG="${{ github.ref_name }}"
echo "folder=${TAG%%.*}" >> $GITHUB_OUTPUT
else
# Default for pushes to main
echo "folder=canary" >> $GITHUB_OUTPUT
fi
- name: Generate Documentation
run: |
pip install pdoc3
./scripts/generate_docs.py ${{ steps.version.outputs.folder }}
- name: Deploy to versioned folder
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs
target-folder: docs
clean: false