-
Notifications
You must be signed in to change notification settings - Fork 146
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 053eccf
Showing
2 changed files
with
16 additions
and
21 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 | ||
staeg: | ||
name: Stage | ||
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,7 +100,7 @@ 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 | ||
|
@@ -115,23 +114,15 @@ jobs: | |
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 | ||
with: | ||
enablement: true | ||
|
||
- name: Push the rendered documentation site to GitHub Pages | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: . | ||
|
||
- name: Deploy to GitHub Pages | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{% extends "!layout.html" %} | ||
{% block extrahead %} | ||
<meta http-equiv="ETag" content="{{ version }}"> | ||
{% endblock %} |