-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a664501
commit c4da9d4
Showing
24 changed files
with
569 additions
and
80,840 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 |
---|---|---|
|
@@ -13,7 +13,7 @@ on: | |
|
||
jobs: | ||
build: | ||
name: Build the documentation | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
|
@@ -73,19 +73,18 @@ jobs: | |
name: generated-docs-html | ||
path: docs/build/html | ||
|
||
publish: | ||
name: Publish the documentation | ||
pages-commit: | ||
name: Commit to Pages Branch | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build | ||
# Make sure we avoid a race condition =) | ||
concurrency: | ||
group: "pages" | ||
group: "docs-stage" | ||
cancel-in-progress: false | ||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
|
||
if: (github.event_name == 'push' && (github.ref_name == 'main' || github.ref_name == 'dev' || github.ref_name == 'new/doc-generation' )) || (github.ref_type == 'tag') | ||
steps: | ||
- name: Checkout the documentation branch | ||
|
@@ -101,37 +100,52 @@ jobs: | |
if: "${{ steps.checkout-docs.outcome != 'success' }}" | ||
run: git switch --orphan static/docs | ||
|
||
- name: Ensure any previous documentation for this branch are removed | ||
- name: Ensure any previous documentation for this branch is removed | ||
run: rm -rf "./${{ github.ref_name }}" | ||
|
||
- name: Download the artifact from the previous job | ||
- name: Download the artifact from the build job | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: generated-docs-html | ||
path: "${{ github.ref_name }}" | ||
|
||
- name: Override the latest version if necessary | ||
if: ${{ github.event_name == 'release' }} | ||
if: ${{ github.ref_type == 'tag' }} | ||
run: | | ||
rm -rf latest && cp -r ${{ github.ref_name }} latest | ||
- name: Overlay static files | ||
run: | | ||
echo "<head><meta http-equiv='refresh' content='0; URL=latest/index.html'></head>" > index.html; | ||
touch .nojekyll | ||
- name: Commit and push this change | ||
run: | | ||
git config user.name "Documentation Publisher"; | ||
git config user.email "[email protected]"; | ||
git add .; | ||
git commit --allow-empty -m "Rebuild ${{ github.ref_name }} from ${{ github.sha }}"; | ||
git commit --allow-empty -m "Build ${{ github.ref_name }} from ${{ github.sha }}"; | ||
git push origin static/docs; | ||
- name: Configure GitHub Pages | ||
uses: actions/configure-pages@v5 | ||
upload-release-asset: | ||
name: Upload Release Asset | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build | ||
if: github.ref_type == 'tag' | ||
steps: | ||
- name: Download the artifact from the previous job | ||
uses: actions/download-artifact@v4 | ||
with: | ||
enablement: true | ||
name: generated-docs-html | ||
path: ".build/${{ github.ref_name }}" | ||
|
||
- name: Push the rendered documentation site to GitHub Pages | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: . | ||
- name: Archive the built documentation | ||
run: | | ||
cd .build/${{ github.ref_name }} && tar -czvf ../documentation.tar.gz * | ||
- name: Deploy to GitHub Pages | ||
uses: actions/deploy-pages@v4 | ||
- name: Upload the documentation as a release asset | ||
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 | ||
with: | ||
files: .build/documentation.tar.gz | ||
tag_name: ${{ github.ref_name }} |
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
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,4 @@ | ||
{% extends "!layout.html" %} | ||
{% block extrahead %} | ||
<meta http-equiv="cache-control" content="max-age=60"> | ||
{% endblock %} |
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
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
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
Oops, something went wrong.