Skip to content

Build Gusto Documentation website #131

Build Gusto Documentation website

Build Gusto Documentation website #131

Workflow file for this run

name: Build Gusto Documentation website
on:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: '0 3 * * *'
jobs:
build_website:
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
with:
repository: firedrakeproject/gusto
- name: Install Gusto and NetCDF4
run: |
. /home/firedrake/firedrake/bin/activate
pip install -e .
pip install sphinx_rtd_theme
pip install netcdf4
pip install pandas
- name: Check documentation links
if: ${{ github.ref == 'refs/heads/main' }}
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-docs/gusto-docs/docs/build/html
retention-days: 1
- name: Fix repo permissions
run: |
git config --global --add safe.directory /__w/gusto-docs/gusto-docs
- name: Keep alive commit
uses: gautamkrishnar/keepalive-workflow@v1
with:
time_elapsed: 30
deploy:
name: Deploy Github pages
needs: build_website
if: ${{ github.ref == 'refs/heads/main' }}
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: https://firedrakeproject.github.io/gusto/docs
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2