test workflow (#36) #13
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
# This workflow builds the /docs directory with tox and pushes the created html documents to GitHub Pages source path. | |
# For this workflow the gh-pages branch is considered as the main source for the GitHub Page. | |
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Build and Publish | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build_and_publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install and Build | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox | |
tox -e docs | |
- name: Publish to GitHub Pages | |
uses: crazy-max/ghaction-github-pages@v2 | |
with: | |
target_branch: gh-pages | |
build_dir: docs/_build/html | |
jekyll: False | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |