Skip to content

Commit

Permalink
Various CI changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarber-akamai committed Aug 31, 2024
1 parent a664501 commit 053eccf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
build:
name: Build the documentation
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
4 changes: 4 additions & 0 deletions docs/templates/layout.html
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 %}

0 comments on commit 053eccf

Please sign in to comment.