Skip to content

Commit

Permalink
towards automatic
Browse files Browse the repository at this point in the history
  • Loading branch information
ofloveandhate committed Jul 11, 2024
1 parent bc0f7d8 commit 0c22d0e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
39 changes: 20 additions & 19 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
name: documentation
name: Sphinx build

on: [push, pull_request, workflow_dispatch]
on: push

permissions:
contents: write

jobs:
docs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
pip install sphinx sphinx_rtd_theme myst_parser
- name: Sphinx build
run: |
sphinx-build docs _build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true
- uses: actions/checkout@v3

- name: Build HTML
uses: ammaraskar/sphinx-action@master

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: html-docs
path: docs/_build/html/

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
canvasapi

0 comments on commit 0c22d0e

Please sign in to comment.