@@ -21,12 +21,15 @@ jobs:
21
21
runs-on : ubuntu-latest
22
22
container :
23
23
image : firedrakeproject/firedrake-docdeps:latest
24
+ outputs :
25
+ conclusion : ${{ steps.report.outputs.conclusion }}
24
26
steps :
25
27
- uses : actions/checkout@v4
26
28
with :
27
29
path : firedrake-repo
28
30
29
31
- name : Install Firedrake
32
+ id : install
30
33
run : |
31
34
: # Pass '--system-site-packages' so already installed packages can be found
32
35
python3 -m venv --system-site-packages venv
@@ -40,12 +43,13 @@ jobs:
40
43
make -C firedrake-repo/docs validate-bibtex
41
44
42
45
- name : Check documentation links
43
- if : github.ref == 'refs/heads/master'
44
46
run : |
45
47
. venv/bin/activate
46
48
make -C firedrake-repo/docs linkcheck
47
49
48
50
- name : Build docs
51
+ id : build
52
+ if : success() || steps.install.conclusion == 'success'
49
53
run : |
50
54
. venv/bin/activate
51
55
cd firedrake-repo/docs
@@ -54,21 +58,31 @@ jobs:
54
58
make latexpdf
55
59
56
60
- name : Copy manual to HTML tree
61
+ id : copy
62
+ if : success() || steps.build.conclusion == 'success'
57
63
run : |
58
64
cd firedrake-repo/docs
59
65
cp build/latex/Firedrake.pdf build/html/_static/manual.pdf
60
66
61
67
- name : Upload artifact
68
+ id : upload
69
+ if : success() || steps.copy.conclusion == 'success'
62
70
uses : actions/upload-pages-artifact@v3
63
71
with :
64
72
name : github-pages
65
73
path : /__w/firedrake/firedrake/firedrake-repo/docs/build/html
66
74
retention-days : 1
67
75
76
+ - name : Report status
77
+ id : report
78
+ if : success() || steps.upload.conclusion == 'success'
79
+ run : echo "conclusion=success" >> "$GITHUB_OUTPUT"
80
+
68
81
deploy :
69
82
name : Deploy Github pages
70
83
needs : build_docs
71
- if : github.ref == 'refs/heads/master'
84
+ # Always run this workflow on master, even if linkcheck fails
85
+ if : always() && github.ref == 'refs/heads/master' && needs.build_docs.outputs.conclusion == 'success'
72
86
permissions :
73
87
pages : write
74
88
id-token : write
78
92
runs-on : ubuntu-latest
79
93
steps :
80
94
- name : Deploy to GitHub Pages
81
- id : deployment
82
95
uses : actions/deploy-pages@v4
0 commit comments