-
Notifications
You must be signed in to change notification settings - Fork 3
64 lines (61 loc) · 2 KB
/
Copy pathbuild_docs.yml
File metadata and controls
64 lines (61 loc) · 2 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
name: Build Guides
env:
GH_ACTIONS_PATH: ${{ github.workspace }}/.github/workflows
IBCDFO_PKG: ${{ github.workspace }}/ibcdfo_pypkg
DOCS_PATH: ${{ github.workspace }}/docs
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
# Get user/group of runner account so that subsequent jobs can run containers
# using that account rather than root. Based on discussions in:
# https://github.com/actions/runner/issues/691
configure:
runs-on: ubuntu-latest
outputs:
uid_gid: ${{ steps.get_user.outputs.uid_gid }}
steps:
- id: get_user
run: |
MY_UID=$(id -u)
MY_GID=$(id -g)
echo "User = $(id -u -n) ($MY_UID)"
echo "Group = $(id -g -n) ($MY_GID)"
echo "uid_gid=$MY_UID:$MY_GID" >> "$GITHUB_OUTPUT"
# Prefer using the latest Python version supported by the package
build_sphinx:
# Prefer LaTeX installation by official image over manual installation to
# get more consistent and quick setup times.
runs-on: ubuntu-latest
needs: configure
env:
UID_GID: ${{ needs.configure.outputs.uid_gid }}
container:
image: texlive/texlive:latest
options: --user ${{ needs.configure.outputs.uid_gid }}
steps:
##-- General Setup Steps
- name: Checkout IBCDFO repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.14
- name: Setup Python with tox
run: |
echo "UID/GID from configure = $UID_GID"
echo "UID/GID actual = $(id -u):$(id -g)"
$GH_ACTIONS_PATH/setup_tox_github_action.sh ${{ runner.os }}
- name: Build Sphinx docs
run: |
# TODO: Local PDF builds failing at present (Issue 243).
cd $IBCDFO_PKG
tox -r -e html
- name: Archive IBCDFO docs
uses: actions/upload-artifact@v6
with:
name: ibcdfo-sphinx-docs
path: |
${{ env.DOCS_PATH }}/build_*