-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.29 KB
/
docs.yaml
File metadata and controls
51 lines (44 loc) · 1.29 KB
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
41
42
43
44
45
46
47
48
49
50
51
name: publish-docs
on:
workflow_run:
workflows:
- publish-packages
types:
- completed
branches:
- main
workflow_dispatch:
inputs:
is_test:
description: "Publish docs to test location"
required: true
type: boolean
default: false
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Generate docs
run: make generate-docs
- name: Publish release docs to test location
if: ${{ (github.event.inputs.is_test || 'false') == 'true' }}
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./publish
# this puts the docs for this tag under gh-pages:/rc/<tag>/
destination_dir: rc/${{ github.event.release.tag_name }}
- name: Publish release docs to production location
if: ${{ (github.event.inputs.is_test || 'false') == 'false' }}
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./publish