Skip to content

Commit 2db3c8d

Browse files
committed
Amend workflow now that docdeps is going away
Still need to point to release before merging.
1 parent 4c42068 commit 2db3c8d

File tree

1 file changed

+37
-26
lines changed

1 file changed

+37
-26
lines changed

.github/workflows/website.yml

Lines changed: 37 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,55 @@ 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
3230

31+
- name: Install system dependencies
32+
run: |
33+
apt-get update
34+
apt-get -y install python3
35+
apt-get -y install \
36+
$(python3 ./firedrake-repo/scripts/firedrake-configure \
37+
--arch ${{ matrix.arch }} --show-system-packages) \
38+
python3-venv
39+
40+
- name: Install PETSc
41+
run: |
42+
git clone --depth 1 \
43+
--branch $(python3 ./firedrake-repo/scripts/firedrake-configure --show-petsc-version) \
44+
https://gitlab.com/petsc/petsc.git
45+
cd petsc
46+
python3 ../firedrake-repo/scripts/firedrake-configure \
47+
--arch ${{ matrix.arch }} --show-petsc-configure-options | \
48+
xargs -L1 ./configure --download-slepc
49+
make PETSC_DIR=/__w/firedrakeproject.github.io/firedrakeproject.github.io/petsc PETSC_ARCH=arch-firedrake-${{ matrix.arch }}
50+
make check
51+
{
52+
echo "PETSC_DIR=/__w/firedrakeproject.github.io/firedrakeproject.github.io/petsc"
53+
echo "PETSC_ARCH=arch-firedrake-${{ matrix.arch }}"
54+
echo "SLEPC_DIR=/__w/firedrakeproject.github.io/firedrakeproject.github.io/petsc/arch-firedrake-${{ matrix.arch }}"
55+
} >> "$GITHUB_ENV"
56+
3357
- name: Install Firedrake
34-
id: install
3558
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
59+
export $(python3 ./firedrake-repo/scripts/firedrake-configure --arch ${{ matrix.arch }} --show-env)
60+
python3 -m venv venv
3961
. venv/bin/activate
40-
pip install --verbose './firedrake-repo[docs]'
62+
pip install --verbose \
63+
--no-binary h5py \
64+
--extra-index-url https://download.pytorch.org/whl/cpu \
65+
'./firedrake-repo[docs]'
66+
pip list
4167
4268
- name: Check bibtex
4369
run: |
4470
. venv/bin/activate
4571
make -C firedrake-repo/docs validate-bibtex
4672
47-
- name: Check documentation links
48-
run: |
49-
. venv/bin/activate
50-
make -C firedrake-repo/docs linkcheck
51-
5273
- name: Build docs
53-
id: build
54-
if: success() || steps.install.conclusion == 'success'
5574
run: |
5675
. venv/bin/activate
5776
cd firedrake-repo/docs
@@ -61,31 +80,23 @@ jobs:
6180
6281
- name: Copy manual to HTML tree
6382
id: copy
64-
if: success() || steps.build.conclusion == 'success'
6583
run: |
6684
cd firedrake-repo/docs
6785
cp build/latex/Firedrake.pdf build/html/_static/manual.pdf
6886
6987
- name: Upload artifact
7088
id: upload
71-
if: success() || steps.copy.conclusion == 'success'
7289
uses: actions/upload-pages-artifact@v3
7390
with:
7491
name: github-pages
75-
path: /__w/firedrakeproject.github.io/firedrakeproject.github.io/firedrake-repo/docs/build/html
92+
path: ./firedrake-repo/docs/build/html
7693
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"
8294

8395
deploy:
8496
name: Deploy Github pages
8597
needs: build_website
8698
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'
99+
if: github.ref == 'refs/heads/main'
89100
permissions:
90101
pages: write
91102
id-token: write

0 commit comments

Comments
 (0)