Files
MeshCore/.github/workflows/github-pages.yml
T
mikecarper 3e0ce84486 Publish immutable short firmware download links
Mirror pinned GitHub release bytes at shorter version-specific Pages URLs. Verify size, SHA-256 and firmware format before publishing, and preserve deployed alias identities across later site builds.

Add RAK4631 Full Companion 1.17.1.10 preview2 UF2 and native DFU ZIP aliases, a short-download directory, documentation and CI regressions. Existing flashing tools use the ZIP URL without losing board-family checks.

Validation: 16 short-link and Pages guard regressions, hosted-doc routing tests, firmware picker tests, full MkDocs build and exact UF2/ZIP byte checks.
2026-10-12 21:47:08 -07:00

58 lines
1.9 KiB
YAML

name: Build and deploy Docs site to GitHub Pages
on:
workflow_dispatch:
push:
branches:
- main
- keymindCascade
permissions:
contents: write
jobs:
github-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Preserve published firmware short-link identities
run: |
python scripts/check_published_firmware_shortlinks.py \
--manifest docs/_data/firmware_shortlinks.json \
--previous "$RUNNER_TEMP/previous-firmware-shortlinks.json"
- name: Build
env:
GH_TOKEN: ${{ github.token }}
MKDOCS_SITE_URL: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/
MKDOCS_REPO_NAME: ${{ github.repository }}
MKDOCS_REPO_URL: https://github.com/${{ github.repository }}/
MKDOCS_EDIT_URI: edit/${{ github.ref_name }}/docs/
run: |
pip install mkdocs-material
python -B test/test_firmware_shortlinks.py -v
python -B test/test_docs_firmware_shortlinks.py -v
node test/test_firmware_picker.js
node test/test_partition_catalog_viewer.js
python scripts/sync_bootloader_manifest.py
mkdocs build
cmp firmware/esp32_partition_catalog.json site/_data/esp32_partition_catalog.json
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4.1.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Preserve the upstream custom domain, but let forks publish at their
# normal <owner>.github.io/<repo>/ URL without claiming that domain.
cname: ${{ github.repository_owner == 'meshcore-dev' && 'docs.meshcore.io' || '' }}
publish_dir: ./site
publish_branch: 'gh-pages'