-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (87 loc) · 2.45 KB
/
Copy pathdocs.yml
File metadata and controls
99 lines (87 loc) · 2.45 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
name: Documentation
on:
pull_request:
paths:
- .github/workflows/docs.yml
- copier/**
- copier.yaml
- docs/**
- Makefile
- mkdocs.yml
- pyproject.toml
- README.md
- src/**
- template/**
- uv.lock
push:
branches:
- main
paths:
- .github/workflows/docs.yml
- copier/**
- copier.yaml
- docs/**
- Makefile
- mkdocs.yml
- pyproject.toml
- README.md
- src/**
- template/**
- uv.lock
workflow_dispatch:
permissions:
contents: read
concurrency:
group: docs-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build and test documentation
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
shell: bash
run: |
curl -LsSf https://astral.sh/uv/0.12.1/install.sh \
| env UV_UNMANAGED_INSTALL="$RUNNER_TEMP/uv-bin" sh
echo "$RUNNER_TEMP/uv-bin" >> "$GITHUB_PATH"
"$RUNNER_TEMP/uv-bin/uv" --version
- name: Install documentation dependencies
run: uv sync --locked --group docs
- name: Build documentation and check links
run: make docs-linkcheck
- name: Upload link-check report
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: docs-linkcheck-report
path: reports/linkchecker.xml
if-no-files-found: ignore
retention-days: 30
- name: Upload GitHub Pages artifact
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: site/
deploy:
name: Deploy documentation
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0