-
Notifications
You must be signed in to change notification settings - Fork 14
76 lines (63 loc) · 1.78 KB
/
create-doc.yaml
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
# A reusable workflow for
# anything that needs to create the
# documentation pages.
# This will accept some input arguments
# and will upload an artifact that contains
# the html directory.
name: "Build doc and upload build/html as tar.gz"
on:
workflow_call:
inputs:
name:
required: true
type: string
targz_name:
required: true
type: string
jobs:
# The actual job of the build-script
build-documentation:
name: Build documentation
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: false
- name: Python installation
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install requirements
run: |
python -m pip install -r requirements.txt
- name: Restore cached gifs
uses: actions/cache@v4
id: cache-gif
with:
key: gifs-${{ hashFiles('docs/os/gifs/**/*.yml') }}
path: |
docs/os/gifs/*/*.gif
- name: Node.js setup
if: ${{ steps.cache-gif.outputs.cache-hit != 'true' }}
uses: actions/setup-node@v4
- name: Run gifs
if: ${{ steps.cache-gif.outputs.cache-hit != 'true' }}
run: |
sudo apt-get install xvfb
npm install -g terminalizer
cd docs/os/gifs
xvfb-run --auto-servernum bash create.sh || echo "Forced succeed $?"
echo pwd=$(pwd)
exit 0
- name: Build and tar.gz documentation
run: |
make all
# tar gz the build/html dir
tar -czf ${{ inputs.targz_name }} -C build/html .
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.name }}
path: ${{ inputs.targz_name }}
retention-days: 3