Repository navigation
80 lines (65 loc) · 2.39 KB
/
Copy pathdocs.yml
File metadata and controls
80 lines (65 loc) · 2.39 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
# SHARED CI CORE v1.2 — T1 — synced 2026-09-08
name: Documentation
permissions:
contents: read
pages: read
on:
workflow_call:
inputs:
online:
type: boolean
default: false
workflow_dispatch:
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
MPLBACKEND: Agg
jobs:
docs:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install uv and Python
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
python-version: "3.12"
- name: Sync documentation environment
run: uv sync --locked --extra docs
- name: Verify redirect path and fragment handling
run: uv run --no-sync python .github/scripts/test_docs_redirects.py
- name: Build documentation with the shared profile
run: uv run --no-sync python .github/oss_checks.py docs --working-tree --output-dir "$RUNNER_TEMP/oss-docs"
- name: Check documentation links
if: inputs.online || github.event_name == 'workflow_dispatch'
run: uv run --no-sync python -m sphinx -E -W -b linkcheck docs docs/_build/linkcheck
# Publish only redirects on GitHub Pages; Read the Docs serves the full site.
- name: Build legacy documentation redirects
run: >-
uv run --no-sync python .github/scripts/build_docs_redirects.py
--source "$RUNNER_TEMP/oss-docs/html"
--output docs/_build/redirects
--base-url https://trendfollowingsystems.readthedocs.io/en/latest/
--project-prefix /TrendFollowingSystems/
- name: Configure GitHub Pages
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
- name: Upload GitHub Pages artifact
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: docs/_build/redirects
deploy:
needs: docs
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy GitHub Pages
id: deployment
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1