Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Deployment of HTML documentation on alternative webhost #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/doc-github-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Publish doc to GitHub Pages

on: push

# Cancels running instances when a pull request is updated by a commit
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}
cancel-in-progress: true

env:
SPHINX_VERSION: 4.5.0

jobs:
doc:
name: Publish doc to GitHub Pages
runs-on: ubuntu-latest

steps:
- uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Checkout code
uses: actions/checkout@v2

- name: Setup Sphinx
run: |
#If additional sphinx dependencies are required they can be added here relatively easily.
#e.g. if I wanted to have the copybutton for example, I would add: pip install sphinx-copybutton
pip install sphinx==${{ env.SPHINX_VERSION }}
pip install -r doc/requirements.txt

- name: Build HTML
run: |
cd doc
make html

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: html-doc
path: doc/build/html/

- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
if: github.ref == 'refs/heads/master'
with:
branch: gh-pages
folder: doc/build/html