-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add deploy-docs workflow for Sphinx -> GitHub Pages deployment
- Loading branch information
1 parent
1113e5e
commit 173a7d8
Showing
2 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Deploy docs | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: | ||
- 3.8 | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: pipenv | ||
|
||
- name: Install Sphinx | ||
run: sudo apt-get install python3-sphinx | ||
|
||
- name: Install pipenv | ||
run: pip install pipenv | ||
|
||
- name: Install dependencies | ||
run: pipenv install --dev | ||
|
||
- name: Build docs | ||
run: | | ||
cd docs | ||
pipenv run make html | ||
- name: Upload docs artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: docs/build/html | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
permissions: | ||
pages: write | ||
id-token: write | ||
|
||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |