Skip to content

Commit 64226e8

Browse files
authored
Use dev container to build website (#10)
1 parent b88c356 commit 64226e8

File tree

1 file changed

+11
-54
lines changed

1 file changed

+11
-54
lines changed

.github/workflows/website.yml

Lines changed: 11 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -20,78 +20,35 @@ jobs:
2020
build_website:
2121
name: Run doc build
2222
runs-on: ubuntu-latest
23+
container:
24+
image: firedrakeproject/firedrake-vanilla-default:dev-release
2325
steps:
24-
- uses: actions/checkout@v4
25-
with:
26-
path: firedrake-repo
27-
repository: firedrakeproject/firedrake
28-
ref: release
29-
30-
- name: Install system dependencies
31-
run: |
32-
sudo apt-get update
33-
sudo apt-get -y install python3
34-
sudo apt-get -y install \
35-
$(python3 ./firedrake-repo/scripts/firedrake-configure \
36-
--arch default --show-system-packages) \
37-
inkscape texlive-full python3-venv
38-
39-
- name: Install PETSc
40-
run: |
41-
git clone --depth 1 \
42-
--branch $(python3 ./firedrake-repo/scripts/firedrake-configure --show-petsc-version) \
43-
https://gitlab.com/petsc/petsc.git
44-
cd petsc
45-
python3 ../firedrake-repo/scripts/firedrake-configure \
46-
--arch default --show-petsc-configure-options | \
47-
xargs -L1 ./configure --download-slepc
48-
make PETSC_DIR=/home/runner/work/firedrakeproject.github.io/firedrakeproject.github.io/petsc PETSC_ARCH=arch-firedrake-default
49-
make check
50-
{
51-
echo "PETSC_DIR=/home/runner/work/firedrakeproject.github.io/firedrakeproject.github.io/petsc"
52-
echo "PETSC_ARCH=arch-firedrake-default"
53-
echo "SLEPC_DIR=/home/runner/work/firedrakeproject.github.io/firedrakeproject.github.io/petsc/arch-firedrake-default"
54-
} >> "$GITHUB_ENV"
55-
56-
- name: Install Firedrake
26+
- name: Install documentation dependencies
5727
run: |
58-
export $(python3 ./firedrake-repo/scripts/firedrake-configure --arch default --show-env)
59-
python3 -m venv venv
60-
. venv/bin/activate
61-
: # Hotfix for petsc4py build, see https://gitlab.com/petsc/petsc/-/issues/1759
62-
echo 'Cython<3.1' > constraints.txt
63-
export PIP_CONSTRAINT=constraints.txt
64-
pip install --verbose \
65-
--no-binary h5py \
66-
--extra-index-url https://download.pytorch.org/whl/cpu \
67-
'./firedrake-repo[docs]'
68-
pip list
28+
python3 -m pip install --no-build-isolation '/opt/firedrake[docs]'
6929
70-
- name: Check bibtex
30+
- name: Install system dependencies
7131
run: |
72-
. venv/bin/activate
73-
make -C firedrake-repo/docs validate-bibtex
32+
apt-get update
33+
apt-get -y install inkscape texlive-full
7434
75-
- name: Build docs
35+
- name: Build documentation
36+
working-directory: /opt/firedrake/docs
7637
run: |
77-
. venv/bin/activate
78-
cd firedrake-repo/docs
7938
make SPHINXOPTS="-t release" html
8039
make latex
8140
make latexpdf
8241
8342
- name: Copy manual to HTML tree
84-
id: copy
43+
working-directory: /opt/firedrake/docs
8544
run: |
86-
cd firedrake-repo/docs
8745
cp build/latex/Firedrake.pdf build/html/_static/manual.pdf
8846
8947
- name: Upload artifact
90-
id: upload
9148
uses: actions/upload-pages-artifact@v3
9249
with:
9350
name: github-pages
94-
path: ./firedrake-repo/docs/build/html
51+
path: /opt/firedrake/docs/build/html
9552
retention-days: 1
9653

9754
deploy:

0 commit comments

Comments
 (0)