minor #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Syntax reference for this file: | |
# https://help.github.com/en/articles/workflow-syntax-for-github-actions | |
# https://github.com/rkdarst/sphinx-actions-test/blob/master/.github/workflows/sphinx-build.yml | |
name: sphinx | |
on: [push, pull_request] | |
# https://gist.github.com/c-bata/ed5e7b7f8015502ee5092a3e77937c99 | |
jobs: | |
build-and-delpoy: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
# https://github.com/marketplace/actions/checkout | |
- uses: actions/checkout@v2 | |
# https://github.com/marketplace/actions/setup-python | |
# ^-- This gives info on matrix testing. | |
- name: Install Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
# I don't know where the "run" thing is documented. | |
- name: Install dependencies | |
run: | | |
sudo apt install pandoc | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Build Sphinx docs | |
run: | | |
cd docs | |
make html | |
cp _static/aurn_stations.html _build/html/aurn_stations.html | |
cp _static/rdata_stations.html _build/html/rdata_stations.html | |
# sphinx-apidoc -o . ../scr | |
# https://github.com/marketplace/actions/github-pages | |
#- if: success() | |
# uses: crazy-max/ghaction-github-pages@master | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# target_branch: gh-pages | |
# build_dir: _build/html/ | |
# https://github.com/peaceiris/actions-gh-pages | |
- name: Deploy | |
if: success() | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
publish_branch: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: docs/_build/html/ | |
# This action probably does everything for you: | |
# https://github.com/marketplace/actions/sphinx-build |