1
+ # TODO!!! Use release branch of Firedrake when building
2
+
1
3
name : Build and push website
2
4
3
5
on :
@@ -20,38 +22,56 @@ jobs:
20
22
build_website :
21
23
name : Run doc build
22
24
runs-on : ubuntu-latest
23
- container :
24
- image : firedrakeproject/firedrake-docdeps:latest
25
- outputs :
26
- conclusion : ${{ steps.report.outputs.conclusion }}
27
25
steps :
28
26
- uses : actions/checkout@v4
29
27
with :
30
28
path : firedrake-repo
31
29
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"
32
57
33
58
- name : Install Firedrake
34
- id : install
35
59
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
39
62
. 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
41
68
42
69
- name : Check bibtex
43
70
run : |
44
71
. venv/bin/activate
45
72
make -C firedrake-repo/docs validate-bibtex
46
73
47
- - name : Check documentation links
48
- run : |
49
- . venv/bin/activate
50
- make -C firedrake-repo/docs linkcheck
51
-
52
74
- name : Build docs
53
- id : build
54
- if : success() || steps.install.conclusion == 'success'
55
75
run : |
56
76
. venv/bin/activate
57
77
cd firedrake-repo/docs
@@ -61,31 +81,23 @@ jobs:
61
81
62
82
- name : Copy manual to HTML tree
63
83
id : copy
64
- if : success() || steps.build.conclusion == 'success'
65
84
run : |
66
85
cd firedrake-repo/docs
67
86
cp build/latex/Firedrake.pdf build/html/_static/manual.pdf
68
87
69
88
- name : Upload artifact
70
89
id : upload
71
- if : success() || steps.copy.conclusion == 'success'
72
90
uses : actions/upload-pages-artifact@v3
73
91
with :
74
92
name : github-pages
75
- path : /__w/firedrakeproject.github.io/firedrakeproject.github.io /firedrake-repo/docs/build/html
93
+ path : . /firedrake-repo/docs/build/html
76
94
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"
82
95
83
96
deploy :
84
97
name : Deploy Github pages
85
98
needs : build_website
86
99
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'
89
101
permissions :
90
102
pages : write
91
103
id-token : write
98
110
99
111
keepalive :
100
112
name : Keepalive
113
+ if : github.ref == 'refs/heads/main'
101
114
runs-on : ubuntu-latest
102
115
permissions :
103
116
actions : write
0 commit comments