-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (55 loc) · 1.8 KB
/
docs.yml
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
name: Documentation
on:
schedule:
# run at 5am every day
- cron: '0 5 * * *'
push:
paths:
- '.github/workflows/docs.yml'
- 'doc/settings.json'
- 'doc/exclude_patterns.inc'
- 'doc/**'
pull_request:
paths:
- '.github/workflows/docs.yml'
- 'doc/settings.json'
- 'doc/exclude-patterns.inc'
- 'doc/**'
# Allow manually triggering the workflow.
workflow_dispatch: {}
env:
XCORE_DOC_BUILDER: 'ghcr.io/xmos/doc_builder:v2.0.0'
jobs:
build_documentation:
name: Build and package documentation
if: github.repository_owner == 'xmos'
runs-on: ubuntu-latest
steps:
- name: Checkout this repo
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10.x'
- name: Pull doc_builder container
run: |
docker pull ${XCORE_DOC_BUILDER}
- name: Build documentation
run: |
# Move files specific to this repo
mv 'doc/settings.json' 'settings.json'
mv 'doc/substitutions.rst-inc' 'doc/substitutions.rst'
docker run --user "$(id -u):$(id -g)" \
--rm \
-v ${{ github.workspace }}:/build \
-e EXCLUDE_PATTERNS="/build/doc/exclude-patterns.inc" \
-e OUTPUT_DIR=/build/doc/_build_sw_pll \
-e PDF=1 \
-e DOXYGEN_INCLUDE=/build/doc/Doxyfile.inc \
-e DOXYGEN_INPUT=ignore ${XCORE_DOC_BUILDER}
- name: Save documentation artifacts
uses: actions/upload-artifact@v3
with:
name: docs-sw_pll
path: doc/_build_sw_pll
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
retention-days: 30