pip install firedrake #7310
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
# Run on the Github hosted runner | |
runs-on: ubuntu-latest | |
container: | |
image: firedrakeproject/firedrake-docdeps:pip | |
# Github hosted runners require running as root user: | |
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#docker-container-filesystem | |
options: --user root | |
volumes: | |
- ${{ github.workspace }}:/home/firedrake/output | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: firedrake-repo | |
- name: Install Firedrake | |
run: | | |
: # Pass '--system-site-packages' so already installed packages can be found | |
python3 -m venv --system-site-packages venv | |
. venv/bin/activate | |
pip uninstall -y firedrake | |
pip install --verbose './firedrake-repo[docs]' | |
- name: Check bibtex | |
run: | | |
. venv/bin/activate | |
make -C firedrake-repo/docs validate-bibtex | |
- name: Check documentation links | |
if: github.ref == 'refs/heads/master' | |
run: | | |
. venv/bin/activate | |
make -C firedrake-repo/docs linkcheck | |
- name: Build docs | |
run: | | |
. venv/bin/activate | |
cd firedrake-repo/docs | |
make html | |
make latex | |
make latexpdf | |
- name: Copy manual to HTML tree | |
run: | | |
cd firedrake-repo/docs | |
cp build/latex/Firedrake.pdf build/html/_static/manual.pdf | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
name: github-pages | |
path: /__w/firedrake/firedrake/firedrake-repo/docs/build/html | |
retention-days: 1 | |
deploy: | |
name: Deploy Github pages | |
needs: build_docs | |
if: github.ref == 'refs/heads/master' | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: http://firedrakeproject.github.io/firedrake | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |