Skip to content

Commit 80d05b2

Browse files
authored
Amend workflow now that docdeps is going away (#9)
1 parent 4c42068 commit 80d05b2

File tree

1 file changed

+39
-26
lines changed

1 file changed

+39
-26
lines changed

.github/workflows/website.yml

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# TODO!!! Use release branch of Firedrake when building
2+
13
name: Build and push website
24

35
on:
@@ -20,38 +22,56 @@ jobs:
2022
build_website:
2123
name: Run doc build
2224
runs-on: ubuntu-latest
23-
container:
24-
image: firedrakeproject/firedrake-docdeps:latest
25-
outputs:
26-
conclusion: ${{ steps.report.outputs.conclusion }}
2725
steps:
2826
- uses: actions/checkout@v4
2927
with:
3028
path: firedrake-repo
3129
repository: firedrakeproject/firedrake
30+
ref: release
31+
32+
- name: Install system dependencies
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get -y install python3
36+
sudo apt-get -y install \
37+
$(python3 ./firedrake-repo/scripts/firedrake-configure \
38+
--arch default --show-system-packages) \
39+
inkscape texlive-full python3-venv
40+
41+
- name: Install PETSc
42+
run: |
43+
git clone --depth 1 \
44+
--branch $(python3 ./firedrake-repo/scripts/firedrake-configure --show-petsc-version) \
45+
https://gitlab.com/petsc/petsc.git
46+
cd petsc
47+
python3 ../firedrake-repo/scripts/firedrake-configure \
48+
--arch default --show-petsc-configure-options | \
49+
xargs -L1 ./configure --download-slepc
50+
make PETSC_DIR=/home/runner/work/firedrakeproject.github.io/firedrakeproject.github.io/petsc PETSC_ARCH=arch-firedrake-default
51+
make check
52+
{
53+
echo "PETSC_DIR=/home/runner/work/firedrakeproject.github.io/firedrakeproject.github.io/petsc"
54+
echo "PETSC_ARCH=arch-firedrake-default"
55+
echo "SLEPC_DIR=/home/runner/work/firedrakeproject.github.io/firedrakeproject.github.io/petsc/arch-firedrake-default"
56+
} >> "$GITHUB_ENV"
3257
3358
- name: Install Firedrake
34-
id: install
3559
run: |
36-
python3 -m pip uninstall --break-system-packages -y firedrake
37-
: # Pass '--system-site-packages' so already installed packages can be found
38-
python3 -m venv --system-site-packages venv
60+
export $(python3 ./firedrake-repo/scripts/firedrake-configure --arch default --show-env)
61+
python3 -m venv venv
3962
. venv/bin/activate
40-
pip install --verbose './firedrake-repo[docs]'
63+
pip install --verbose \
64+
--no-binary h5py \
65+
--extra-index-url https://download.pytorch.org/whl/cpu \
66+
'./firedrake-repo[docs]'
67+
pip list
4168
4269
- name: Check bibtex
4370
run: |
4471
. venv/bin/activate
4572
make -C firedrake-repo/docs validate-bibtex
4673
47-
- name: Check documentation links
48-
run: |
49-
. venv/bin/activate
50-
make -C firedrake-repo/docs linkcheck
51-
5274
- name: Build docs
53-
id: build
54-
if: success() || steps.install.conclusion == 'success'
5575
run: |
5676
. venv/bin/activate
5777
cd firedrake-repo/docs
@@ -61,31 +81,23 @@ jobs:
6181
6282
- name: Copy manual to HTML tree
6383
id: copy
64-
if: success() || steps.build.conclusion == 'success'
6584
run: |
6685
cd firedrake-repo/docs
6786
cp build/latex/Firedrake.pdf build/html/_static/manual.pdf
6887
6988
- name: Upload artifact
7089
id: upload
71-
if: success() || steps.copy.conclusion == 'success'
7290
uses: actions/upload-pages-artifact@v3
7391
with:
7492
name: github-pages
75-
path: /__w/firedrakeproject.github.io/firedrakeproject.github.io/firedrake-repo/docs/build/html
93+
path: ./firedrake-repo/docs/build/html
7694
retention-days: 1
77-
78-
- name: Report status
79-
id: report
80-
if: success() || steps.upload.conclusion == 'success'
81-
run: echo "conclusion=success" >> "$GITHUB_OUTPUT"
8295

8396
deploy:
8497
name: Deploy Github pages
8598
needs: build_website
8699
runs-on: ubuntu-latest
87-
# Always run this workflow on main, even if linkcheck fails
88-
if: always() && github.ref == 'refs/heads/main' && needs.build_website.outputs.conclusion == 'success'
100+
if: github.ref == 'refs/heads/main'
89101
permissions:
90102
pages: write
91103
id-token: write
@@ -98,6 +110,7 @@ jobs:
98110

99111
keepalive:
100112
name: Keepalive
113+
if: github.ref == 'refs/heads/main'
101114
runs-on: ubuntu-latest
102115
permissions:
103116
actions: write

0 commit comments

Comments
 (0)