mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 14:57:56 -05:00
- add workflow_dispatch as a trigger to see if the button will become available in github
59 lines
1.6 KiB
YAML
59 lines
1.6 KiB
YAML
name: Publish Sphinx Built Webpages to Github Pages
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- website
|
|
paths:
|
|
- 'docs/**'
|
|
- 'examples/**'
|
|
|
|
jobs:
|
|
release:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.8'
|
|
|
|
# Caching works, but then it reinstalls the regular dependencies anyway, so defeats the purpose of caching.
|
|
# - name: Install pip
|
|
# run: |
|
|
# python -m pip install --upgrade pip
|
|
|
|
# - name: Get pip cache dir
|
|
# id: pip-cache
|
|
# run : echo "::set-output name=dir::$(pip cache dir)"
|
|
|
|
# - name: Cache dependencies
|
|
# uses: actions/cache@v1
|
|
# with:
|
|
# path: ${{ steps.pip-cache.outputs.dir }}
|
|
# key: ${{ runner.os }}-pip-${{ hashFiles('**/docs/requirements.txt') }}
|
|
# restore-keys: |
|
|
# ${{ runner.os }}-pip-
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt install pandoc
|
|
python -m pip install --upgrade pip
|
|
pip install -r docs/requirements.txt
|
|
|
|
- name: Install ReadTheDocs theme
|
|
run: |
|
|
pip install sphinx_rtd_theme
|
|
|
|
- name: Build Sphinx documentation
|
|
run: |
|
|
cd docs
|
|
make html
|
|
|
|
- name: Deploy to gh-pages
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./docs/build/html
|