-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (73 loc) · 1.92 KB
/
cd-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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: cd-docs
permissions:
contents: read
on: # yamllint disable-line rule:truthy
workflow_call:
inputs:
repository:
description: 'mpi4py repository'
default: mpi4py/mpi4py
required: false
type: string
ref:
description: 'mpi4py ref'
default: ''
required: false
type: string
workflow_dispatch:
inputs:
repository:
description: 'mpi4py repository'
default: mpi4py/mpi4py
required: true
type: string
ref:
description: 'mpi4py ref'
default: ''
required: false
type: string
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Install LaTeX
run: |
# Install LaTeX
sudo apt update && \
sudo apt install -y \
texlive-latex-base \
texlive-latex-recommended \
texlive-latex-extra \
latexmk \
texinfo
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ inputs.repository || 'mpi4py/mpi4py' }}
ref: ${{ inputs.ref }}
- name: Set SOURCE_DATE_EPOCH
run: |
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
echo SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH >> $GITHUB_ENV
echo $(git log -1 --pretty=%ci) [timestamp=$SOURCE_DATE_EPOCH]
shell: bash
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3
- name: Upgrade pip
run: python -m pip install -U pip
- name: Install tox
run: python -m pip install -U tox
- name: Build documentation
run: python -m tox run -m docs
- name: Archive documentation
run: |
ZIP=mpi4py-docs.zip
ln -s docs ${ZIP%.zip}
python -m zipfile -c $ZIP ${ZIP%.zip}
- name: Upload documentation
uses: actions/upload-artifact@v4
with:
name: docs
path: mpi4py-docs.zip