Repository navigation
116 lines (101 loc) · 3.17 KB
/
Copy pathdocs.yml
File metadata and controls
116 lines (101 loc) · 3.17 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: docs.yml
permissions:
contents: read
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
UV_VERSION: "0.13.0"
UV_PROJECT_ENVIRONMENT: venv
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- master
paths:
- 'docs/**'
- 'openseries/**'
- 'pyproject.toml'
- 'uv.lock'
- '.python-version'
- '.readthedocs.yaml'
- '.github/workflows/docs.yml'
pull_request:
branches:
- master
paths:
- 'docs/**'
- 'openseries/**'
- 'pyproject.toml'
- 'uv.lock'
- '.python-version'
- '.readthedocs.yaml'
- '.github/workflows/docs.yml'
workflow_dispatch: {}
jobs:
build:
name: Build documentation
defaults:
run:
shell: bash
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check out GitHub repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
ref: ${{ (github.event_name == 'workflow_dispatch' && github.ref) || github.sha }}
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
id: setup_python
with:
python-version-file: '.python-version'
- name: Set up uv
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
with:
version: ${{ env.UV_VERSION }}
- name: Sync dependencies (locked)
run: uv sync --locked --extra docs
- name: Build documentation
run: uv run --directory docs make builddocs
- name: Check for documentation warnings
run: uv run --directory docs make strict
- name: Upload HTML artifact
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: docs-html
path: docs/build/html
if-no-files-found: error
retention-days: 1
deploy:
name: Deploy documentation
needs: build
if: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' }}
defaults:
run:
shell: bash
runs-on: ubuntu-latest
permissions:
contents: read
pages: write # Required for actions/deploy-pages to deploy to GitHub Pages
id-token: write # Required for OIDC token for GitHub Pages deployment
environment:
name: github-pages
steps:
- name: Download HTML artifact
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: docs-html
path: docs/build/html
- name: Setup Pages
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
- name: Upload to GitHub Pages
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: docs/build/html
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1