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

Publish docs on Github Pages #257

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
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
7 changes: 3 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
branches: [main]
pull_request: {}
workflow_dispatch: {}

# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
concurrency:
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Docs
on:
push:
branches: [main]
pull_request: {}
workflow_dispatch: {}

jobs:
setup-pages:
name: Setup Pages
runs-on: ubuntu-latest
steps:
- name: Configure Pages
uses: actions/configure-pages@v2

build:
name: Build Sphinx Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: pip
cache-dependency-path: docs/requirements.txt
- name: Install dependencies
run: pip install --require-hashes -r docs/requirements.txt
- name: Build docs
run: sphinx-build -W -b html docs docs/_build
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: docs/_build

publish:
needs:
- build
- setup-pages
name: Publish docs on Github Pages
runs-on: ubuntu-latest
permissions:
pages: write
# To verify the deployment originates from an appropriate source.
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v1
with:
preview: true