-
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.
Drop mike versioning from documentation
- Loading branch information
1 parent
9849207
commit dba9ea0
Showing
3 changed files
with
63 additions
and
43 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,36 @@ | ||
name: Build Documentation | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: Build Documentation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: false | ||
|
||
- name: Install dependencies | ||
run: poetry install --with docs | ||
|
||
- name: Build documentation | ||
run: mkdocs build | ||
|
||
- name: Upload docs to artifact storage | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: site |
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 |
---|---|---|
@@ -1,52 +1,32 @@ | ||
name: Publish Documentation | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
description: 'The documentation version number' | ||
default: 'develop' | ||
type: string | ||
latest: | ||
description: 'Set the new build as the latest version' | ||
default: false | ||
type: boolean | ||
push: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
name: Publish HTML | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: false | ||
jobs: | ||
build: | ||
name: Build | ||
uses: ./.github/workflows/DocumentationBuild.yml | ||
secrets: inherit | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: poetry install --with docs | ||
deploy: | ||
name: Deploy Documentation | ||
needs: [ build ] | ||
|
||
- name: Configure git | ||
run: | | ||
git config --global user.name "Documentation CI" | ||
git config --global user.email [email protected] | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
- name: Build and publish | ||
run: poetry run mike deploy --push ${{ inputs.version || 'develop' }} | ||
steps: | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Update latest version | ||
if: ${{ inputs.latest }} | ||
run: | | ||
poetry run mike alias --update-aliases --push ${{ inputs.version }} latest | ||
poetry run mike set-default --push latest | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
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 |
---|---|---|
|
@@ -12,3 +12,7 @@ poetry.lock | |
|
||
# Coverage results | ||
.coverage | ||
|
||
# Compiled project documentation | ||
site | ||
|