-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploy docs to GitHub Pages via GitHub Actions
- Loading branch information
Showing
3 changed files
with
77 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
name: "Docs" | ||
|
||
on: | ||
release: | ||
types: ["published"] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "deploy-docs" | ||
cancel-in-progress: false | ||
|
||
env: | ||
FORCE_COLOR: "1" | ||
PIP_DISABLE_PIP_VERSION_CHECK: "1" | ||
PYTHON_VERSION: "3.11" | ||
|
||
jobs: | ||
build: | ||
name: "Build docs" | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: "Checkout code" | ||
uses: "actions/checkout@v4" | ||
|
||
- name: "Setup Python ${{ env.PYTHON_VERSION }}" | ||
uses: "actions/setup-python@v4" | ||
with: | ||
python-version: "${{ env.PYTHON_VERSION }}" | ||
cache: "pip" | ||
cache-dependency-path: "requirements/*.txt" | ||
|
||
- name: "Update pip and install Nox" | ||
run: "python -m pip install pip nox -c requirements/constraints.txt" | ||
|
||
- name: "Setup GitHub Pages" | ||
uses: "actions/configure-pages@v4" | ||
|
||
- name: "Build docs with 'docs' Nox session" | ||
run: "nox -s docs" | ||
|
||
- name: "Upload artifact" | ||
uses: "actions/upload-pages-artifact@v3" | ||
with: | ||
path: "site/" | ||
|
||
deploy: | ||
name: "Deploy docs to GitHub Pages" | ||
runs-on: "ubuntu-latest" | ||
needs: | ||
- "build" | ||
environment: | ||
name: "github-pages" | ||
url: "${{ steps.deployment.outputs.page_url }}" | ||
steps: | ||
- name: "Deploy docs to GitHub Pages" | ||
id: "deployment" | ||
uses: "actions/deploy-pages@v4" |
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