Skip to content

Commit

Permalink
Update docs workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
arxyzan committed Aug 15, 2023
1 parent 1068ecf commit 2b77cd8
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: "Sphinx: Render docs"

on: push

name: Docs
on: [push, pull_request, workflow_dispatch]
permissions:
contents: write
jobs:
build:
docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- 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
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Install dependencies
run: |
pip install sphinx sphinx_rtd_theme furo
- name: Sphinx build
run: |
sphinx-build doc _build
- name: Deploy
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

0 comments on commit 2b77cd8

Please sign in to comment.