Skip to content

Commit

Permalink
Update sphinx.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
soodoku authored Oct 25, 2023
1 parent 8b3fbfb commit 913d0c2
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
name: Sphinx to GitHub Pages

on:
push:
branches: [main] # branch to trigger deployment

name: Docs
on: [push, pull_request, workflow_dispatch]
permissions:
contents: write
jobs:
pages:
runs-on: ubuntu-20.04
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
docs:
runs-on: ubuntu-latest
steps:
- id: deployment
uses: sphinx-notes/[email protected]
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Install dependencies
run: |
pip install sphinx sphinx_rtd_theme
- name: Sphinx build
run: |
sphinx-build docs/source _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 913d0c2

Please sign in to comment.