13 Commits

Author SHA1 Message Date
f7345b5433 test
Some checks failed
CI - Docs build check / build-check (push) Failing after 8s
Deploy RC preview to GitHub Pages / deploy-rc-pages (push) Failing after 5s
2026-02-05 13:30:06 -06:00
a5640d0e02 oops more errors 2026-02-05 13:25:56 -06:00
50252ece04 oops branch name wrong 2026-02-05 13:18:55 -06:00
0fa737e74b test 2026-02-05 13:17:33 -06:00
973dbefabb test 2026-02-05 13:01:37 -06:00
afd82d071c test 2026-02-05 12:44:38 -06:00
ead328c075 fix env
Some checks failed
CI - Docs build check / build-check (push) Failing after 7s
2026-02-05 09:49:35 -06:00
155c9a4222 fix strict var
All checks were successful
CI - Docs build check / build-check (push) Successful in 8s
2026-02-05 09:46:32 -06:00
bdbce0664b fix validation
Some checks failed
CI - Docs build check / build-check (push) Failing after 8s
2026-02-05 09:42:36 -06:00
c185079bf1 fix
All checks were successful
CI - Docs build check / build-check (push) Successful in 9s
2026-02-05 09:28:36 -06:00
039228ab99 update ci
All checks were successful
CI - Docs build check / build-check (push) Successful in 8s
Deploy RC preview to GitHub Pages / deploy-rc-pages (push) Successful in 6s
2026-02-05 09:24:58 -06:00
58d7f6be48 update
All checks were successful
CI - Docs build check / build-check (push) Successful in 8s
Deploy RC preview to GitHub Pages / deploy-rc-pages (push) Successful in 6s
2026-02-05 08:46:15 -06:00
4dd5e308cf update to deploy-rc
Some checks failed
CI - Docs build check / build-check (push) Successful in 8s
Deploy RC preview to GitHub Pages / deploy-rc-pages (push) Failing after 8s
2026-02-05 08:41:17 -06:00
2 changed files with 112 additions and 57 deletions

76
.github/workflows/deploy-rc-pages.yml vendored Normal file
View File

@@ -0,0 +1,76 @@
name: Deploy RC preview to GitHub Pages
on:
push:
tags: ["rc*"]
workflow_dispatch:
permissions:
contents: write
jobs:
deploy-rc-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout (tag)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
set -euo pipefail
pip install -r mkdocs/requirements.txt
- name: Build site (strict default)
run: |
set -euo pipefail
export MKDOCS_STRICT="${MKDOCS_STRICT:-true}"
export TMPDIR="${RUNNER_TEMP:-$TMPDIR}"
export OUTPUT_DIR="${OUTPUT_DIR:-${TMPDIR}/dist/}"
tools/build.sh --config mkdocs/mkdocs.yml
- name: Checkout gh-pages branch
run: |
set -euo pipefail
git fetch origin gh-pages:gh-pages || true
if git show-ref --verify --quiet refs/heads/gh-pages; then
git switch gh-pages
else
git switch --orphan gh-pages
rm -rf ./*
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit --allow-empty -m "Initialize gh-pages"
fi
- name: Publish RC preview under /rc/<tag>/
run: |
export TMPDIR="${RUNNER_TEMP:-$TMPDIR}"
export OUTPUT_DIR="${OUTPUT_DIR:-${TMPDIR}/dist/}"
set -euo pipefail
rm -rf "rc"* || true
mkdir -p "rc/"
cp -a "$OUTPUT_DIR/." "rc/"
git add -A
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit -m "Deploy RC preview ${GITHUB_REF_NAME}" || echo "No changes to commit"
git push origin gh-pages
- name: Publish prerelease (GitHub)
uses: softprops/action-gh-release@v2
with:
prerelease: true
body: |
RC preview: https://<org>.github.io/<repo>/rc/
Tag: ${{ github.ref_name }}
Commit: ${{ github.sha }}

View File

@@ -3,29 +3,27 @@ name: Build & publish docs (rc + release)
on:
push:
tags:
- "rc*"
- "rc-*"
- "v*"
workflow_dispatch:
permissions:
contents: write
contents: read
env:
MKDOCS_CONFIG: mkdocs/mkdocs.yml
MKDOCS_OUTPUT_DIR: ${{ runner.temp }}/dist
MKDOCS_STRICT: ${{ vars.MKDOCS_STRICT || 'true' }}
jobs:
publish:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout (tag)
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: "3.11"
@@ -34,7 +32,7 @@ jobs:
set -euo pipefail
pip install -r mkdocs/requirements.txt
- name: Build docs (normal + offline, strict gate)
- name: Build docs (strict gate)
run: |
set -euo pipefail
@@ -43,24 +41,27 @@ jobs:
FLAGS+=(--strict)
fi
OUT_BASE="${RUNNER_TEMP}/mkdocs_out"
SITE="${OUT_BASE}/site"
SITE_OFFLINE="${OUT_BASE}/site_offline"
mkdir -p "${MKDOCS_OUTPUT_DIR}"
rm -rf "${OUT_BASE}"
mkdir -p "${SITE}" "${SITE_OFFLINE}"
OFFLINE="${OFFLINE}" mkdocs build \
"${FLAGS[@]}" \
-f "${MKDOCS_CONFIG}" \
-d "${MKDOCS_OUTPUT_DIR}"
mkdocs build "${FLAGS[@]}" -f "${MKDOCS_CONFIG}" -d "${SITE}"
OFFLINE=true mkdocs build "${FLAGS[@]}" -f "${MKDOCS_CONFIG}" -d "${SITE_OFFLINE}"
- name: Zip offline site
- name: Zip site
run: |
set -euo pipefail
cd "${RUNNER_TEMP}/mkdocs_out"
zip -r "${GITHUB_REF_NAME}.zip" site_offline
cd "${MKDOCS_OUTPUT_DIR}"
zip -r "${GITHUB_REF_NAME}.zip" .
release:
runs-on: ubuntu-latest
needs: build
steps:
# -------------------------
# RC-only step
# -------------------------
- name: Publish prerelease
if: startsWith(github.ref_name, 'rc')
if: startsWith(github.ref_name, 'rc-')
uses: softprops/action-gh-release@v2
with:
prerelease: true
@@ -69,8 +70,11 @@ jobs:
body: |
Release candidate preview (if deployed): /rc/
files: |
${{ runner.temp }}/mkdocs_out/${{ github.ref_name }}.zip
${{ runner.temp }}/${{ github.ref_name }}.zip
# -------------------------
# Final release-only step
# -------------------------
- name: Publish release
if: startsWith(github.ref_name, 'v')
uses: softprops/action-gh-release@v2
@@ -78,37 +82,12 @@ jobs:
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
files: |
${{ runner.temp }}/mkdocs_out/${{ github.ref_name }}.zip
- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
fetch-depth: 0
- name: Deploy release to gh-pages root
if: startsWith(github.ref_name, 'v')
${{ runner.temp }}/${{ github.ref_name }}.zip
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy
run: |
set -euo pipefail
rm -rf ./*
cp -a ${RUNNER_TEMP}/mkdocs_out/site/. .
git add -A
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit -m "Deploy release ${GITHUB_REF_NAME}" || echo "No changes to commit"
git push origin gh-pages
echo "TBD :)"
- name: Deploy RC preview to /rc/
if: startsWith(github.ref_name, 'rc')
run: |
set -euo pipefail
rm -rf rc
mkdir -p rc
cp -a ${RUNNER_TEMP}/mkdocs_out/site/. rc/
printf '{"tag":"%s"}\n' "${GITHUB_REF_NAME}" > rc/rc.json
git add -A
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git commit -m "Deploy RC preview ${GITHUB_REF_NAME}" || echo "No changes to commit"
git push origin gh-pages