Skip to content

Commit

Permalink
Add a workflow to build and deploy documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ajdawson committed Nov 20, 2024
1 parent 1acc2ef commit 66b0b5d
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

name: Documentation

on:
pull_request:
push:
branches:
- main
release:
types:
- published

jobs:
build-docs:
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v2
with:
environment-name: TEST
init-shell: bash
create-args: >-
python=3 pip pyspharm iris xarray sphinx sphinx-issues --channel conda-forge
- name: Install windspharm
shell: bash -l {0}
run: |
python -m pip install -e . --no-deps --force-reinstall
- name: Build documentation
shell: bash -l {0}
run: |
set -e
micromamba activate TEST
pushd docs
make clean html linkcheck
popd
- name: Deploy
if: success() && github.event_name == 'release'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html

0 comments on commit 66b0b5d

Please sign in to comment.