Skip to content

remove caches and and old nwm client (#271) #132

remove caches and and old nwm client (#271)

remove caches and and old nwm client (#271) #132

name: Deploy gh-pages
on:
push:
branches: [ main ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip Sphinx furo
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python3 -m pip install ./python/_restclient[develop]
python3 -m pip install ./python/nwis_client[develop]
python3 -m pip install ./python/nwm_client[develop]
python3 -m pip install ./python/events[develop]
python3 -m pip install ./python/metrics[develop]
- name: Build Sphinx documentation
run: |
cd docs/
make html
git checkout --track origin/gh-pages
rsync -ac _build/html/ ../
cd ..
rm -rf docs
if [[ $(git status --porcelain | wc -l) -gt 0 ]]; then
git config user.name "github-actions"
git config user.email "[email protected]"
git add -A
git commit -m "Deploy gh-pages"
git push origin gh-pages
fi