Skip to content

ADMT Tasks (see miletones) #248

ADMT Tasks (see miletones)

ADMT Tasks (see miletones) #248

Workflow file for this run

name: Build documentation
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
sudo apt-get install pandoc
python -m pip install --upgrade pip
pip install gsw numpy netCDF4 matplotlib Sphinx jupyter myst-parser sphinx-rtd-theme
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build documentation
run: |
python -m jupyter nbconvert README.ipynb --execute --to rst --output README.rst --output-dir docs
sphinx-build docs docs/_build/html
- name: Clone gh-pages branch
if: success() && (github.ref == 'refs/heads/master')
uses: actions/checkout@master
with:
ref: gh-pages
path: pages-clone
- name: Update documentation
if: success() && (github.ref == 'refs/heads/master')
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
cd pages-clone
git rm -rf .
cp -R ../docs/_build/html/* .
touch .nojekyll
git add .nojekyll
git add *
git commit --allow-empty -m"update documentation"
git push