Repository navigation
63 lines (63 loc) · 1.75 KB
/
Copy pathdocs.yml
File metadata and controls
63 lines (63 loc) · 1.75 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
name: Documentation and wiki
on:
push:
branches: [main]
paths:
- 'README.md'
- 'CONTRIBUTING.md'
- 'SECURITY.md'
- 'docs/**'
- 'scripts/docs_tool.py'
- 'tests/test_documentation_tools.py'
- '.github/workflows/docs.yml'
pull_request:
paths:
- 'README.md'
- 'CONTRIBUTING.md'
- 'SECURITY.md'
- 'docs/**'
- 'scripts/docs_tool.py'
- 'tests/test_documentation_tools.py'
- '.github/workflows/docs.yml'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: graphpaper-docs-${{ github.ref }}
cancel-in-progress: false
jobs:
documentation:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: python -m unittest discover -s tests -p test_documentation_tools.py -v
- run: python scripts/docs_tool.py check
- run: python scripts/docs_tool.py render-wiki --output test-results/wiki-preview
- uses: actions/upload-artifact@v4
with:
name: wiki-preview
path: test-results/wiki-preview/
wiki:
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
needs: documentation
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Publish managed wiki pages without replacing independent edits
env:
GH_TOKEN: ${{ github.token }}
run: python scripts/docs_tool.py publish-wiki