Repository navigation
104 lines (92 loc) · 2.82 KB
/
Copy pathdocs.yml
File metadata and controls
104 lines (92 loc) · 2.82 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
name: Docs
on:
push:
branches: [ master ]
paths:
- 'docs/**'
- 'wiki/**'
- 'tools/publish-wiki.ps1'
- 'mkdocs.yml'
- 'requirements-docs.in'
- 'requirements-docs.txt'
- 'tools/generate-compat-site.py'
- 'tools/generate-compat-results.py'
- '.github/workflows/docs.yml'
- 'README.md'
- 'CONTRIBUTING.md'
- 'CODE_OF_CONDUCT.md'
- 'SUPPORT.md'
- 'SECURITY.md'
- 'LICENSE'
- 'THIRD-PARTY-NOTICES.md'
- 'CHANGELOG.md'
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: docs-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build documentation
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: '3.12'
cache: pip
cache-dependency-path: requirements-docs.txt
- name: Install documentation dependencies
run: python -m pip install --disable-pip-version-check --require-hashes -r requirements-docs.txt
- name: Check compatibility browser data
run: python tools/generate-compat-site.py --check
- name: Build site
run: mkdocs build --strict
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: site
deploy:
name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
wiki:
name: Publish wiki
if: github.ref == 'refs/heads/master'
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Publish curated wiki pages
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
set -euo pipefail
git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
pwsh -NoProfile -File tools/publish-wiki.ps1 -Message "Update 5DO wiki from ${GITHUB_SHA::7}"