Merge pull request #2 from engineerjoe440/develop #94
Workflow file for this run
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 | |
name: Sphinx Documentation Builder | |
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.9 | |
# I don't know where the "run" thing is documented. | |
- name: Install dependencies | |
run: | | |
#pip install -r requirements.txt | |
pip install -r docsource/sphinxrequires.txt | |
- name: Build Sphinx docs | |
if: success() | |
run: | | |
pip install .[full] | |
python3 -c "import selprotopy; print('selprotopy.__file__')" | |
sphinx-build -M html docsource docs | |
# 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/html/ | |
# This action probably does everything for you: | |
# https://github.com/marketplace/actions/sphinx-build |