From 73b8bb5ba968eafc13c9b65251d3e74d7b7e22d8 Mon Sep 17 00:00:00 2001 From: Jack Betteridge Date: Wed, 26 Jul 2023 15:36:55 +0100 Subject: [PATCH] Check docs build as part of CI --- .github/workflows/docs.yml | 57 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 000000000..e6bec0821 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,57 @@ +name: Check docs build cleanly + +on: + # Run on pushes to master + push: + branches: + - master + # And all pull requests + pull_request: + +concurrency: + # Cancels jobs running if new commits are pushed + group: > + ${{ github.workflow }}- + ${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + build_docs: + name: Run doc build + # The type of runner that the job will run on + runs-on: ubuntu-latest + # The docker container to use. + container: + image: firedrakeproject/firedrake-docdeps:latest + options: --user root + volumes: + - ${{ github.workspace }}:/home/firedrake/output + # Steps represent a sequence of tasks that will be executed as + # part of the jobs + steps: + - uses: actions/checkout@v3 + - name: Install checkedout Gusto + run: | + . /home/firedrake/firedrake/bin/activate + python -m pip install -e . + - name: Install Read the Docs theme + run: | + . /home/firedrake/firedrake/bin/activate + python -m pip install sphinx_rtd_theme + - name: Check documentation links + if: ${{ github.ref == 'refs/heads/master' }} + run: | + . /home/firedrake/firedrake/bin/activate + cd docs + make linkcheck + - name: Build docs + run: | + . /home/firedrake/firedrake/bin/activate + cd docs + make html + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + name: github-pages + path: /__w/gusto/gusto/docs/build/html + retention-days: 1