Repository navigation
58 lines (57 loc) · 1.93 KB
/
Copy pathrebuild-docs.yml
File metadata and controls
58 lines (57 loc) · 1.93 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
52
53
54
55
56
57
58
name: Rebuild Docs
on:
workflow_dispatch:
inputs:
commit:
description: 'Commit SHA or branch/tag to build docs from'
required: true
type: string
version:
description: 'Version number to publish docs as'
required: true
type: string
python_version:
description: 'Python version for the docs build'
required: true
default: '3.11'
type: string
jobs:
docbuild:
name: ubuntu-latest py${{ inputs.python_version }}
runs-on: ubuntu-latest
env:
UV_PYTHON: ${{ inputs.python_version }}
permissions:
contents: write
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.commit }}
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: ${{ env.UV_PYTHON }}
- name: Install uv
uses: astral-sh/setup-uv@v10.3.1
with:
version: "0.13.4"
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Install activitysim
run: |
uv sync --locked --dev
- name: Build the docs
run: |
cd docs
make clean
make html
- name: Push to GitHub Pages
uses: peaceiris/actions-gh-pages@v3.8.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Token is created automatically by Github Actions, no other config needed
publish_dir: ./docs/_build/html
destination_dir: ${{ github.event.inputs.version }}