@@ -296,3 +296,81 @@ jobs:
296296 with :
297297 name : zenodo-canary
298298 path : firedrake-install.log
299+
300+ build_docs :
301+ name : Build documentation
302+ runs-on : ubuntu-latest
303+ container :
304+ image : firedrakeproject/firedrake-docdeps:latest
305+ outputs :
306+ conclusion : ${{ steps.report.outputs.conclusion }}
307+ steps :
308+ - uses : actions/checkout@v4
309+ with :
310+ path : firedrake-repo
311+
312+ - name : Install Firedrake
313+ id : install
314+ run : |
315+ : # Pass '--system-site-packages' so already installed packages can be found
316+ python3 -m venv --system-site-packages venv
317+ . venv/bin/activate
318+ pip uninstall -y firedrake
319+ pip install --verbose './firedrake-repo[docs]'
320+
321+ - name : Check bibtex
322+ run : |
323+ . venv/bin/activate
324+ make -C firedrake-repo/docs validate-bibtex
325+
326+ - name : Check documentation links
327+ run : |
328+ . venv/bin/activate
329+ make -C firedrake-repo/docs linkcheck
330+
331+ - name : Build docs
332+ id : build
333+ if : success() || steps.install.conclusion == 'success'
334+ run : |
335+ . venv/bin/activate
336+ cd firedrake-repo/docs
337+ make html
338+ make latex
339+ make latexpdf
340+
341+ - name : Copy manual to HTML tree
342+ id : copy
343+ if : success() || steps.build.conclusion == 'success'
344+ run : |
345+ cd firedrake-repo/docs
346+ cp build/latex/Firedrake.pdf build/html/_static/manual.pdf
347+
348+ - name : Upload artifact
349+ id : upload
350+ if : success() || steps.copy.conclusion == 'success'
351+ uses : actions/upload-pages-artifact@v3
352+ with :
353+ name : github-pages
354+ path : /__w/firedrake/firedrake/firedrake-repo/docs/build/html
355+ retention-days : 1
356+
357+ - name : Report status
358+ id : report
359+ if : success() || steps.upload.conclusion == 'success'
360+ run : echo "conclusion=success" >> "$GITHUB_OUTPUT"
361+
362+ deploy :
363+ name : Deploy Github pages
364+ needs : build_docs
365+ # Always run this workflow on master, even if linkcheck fails
366+ if : always() && github.ref == 'refs/heads/master' && needs.build_docs.outputs.conclusion == 'success'
367+ permissions :
368+ pages : write
369+ id-token : write
370+ environment :
371+ name : github-pages
372+ url : http://firedrakeproject.github.io/firedrake
373+ runs-on : ubuntu-latest
374+ steps :
375+ - name : Deploy to GitHub Pages
376+ uses : actions/deploy-pages@v4
0 commit comments