Publish ref docs to GitHub Pages with versioning and version picker#341
Merged
Conversation
- Add push-to-main trigger to generate-docs.yml so latest/ auto-deploys on merge - Add deploy-pages job: deploys docs to gh-pages branch under latest/ (every push to main) and under the release tag (e.g. v2.5.0/) on release events - Maintain versions.json at the site root; sorted semver descending with latest always first - Add root index.html that meta-redirects to latest/ - Add version-picker.js: fetches versions.json and replaces the static #ll-topnav-version badge with a <select> dropdown for navigating between published versions; gracefully falls back to static badge when versions.json is unavailable (local builds) - Register version-picker.js in Doxyfile HTML_EXTRA_FILES - Load version-picker.js in header.html via <script defer> - Add <select> styles to lootlocker-theme.css matching the existing nav badge Part of lootlocker/index#1465
There was a problem hiding this comment.
Pull request overview
This PR extends the existing Doxygen reference-doc generation pipeline to publish versioned docs to GitHub Pages (via gh-pages) and adds a client-side version picker in the generated HTML so users can switch between published doc versions.
Changes:
- Adds a
deploy-pagesjob intended to publish generated docs togh-pagesand maintain aversions.jsonindex plus a root redirect page. - Introduces a
version-picker.jsscript and wires it into the Doxygen HTML header to replace the static version badge with a<select>populated fromversions.json. - Updates Doxygen config/CSS to ship and style the version picker assets.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/generate-docs.yml |
Adds a Pages deployment job, generates versions.json, and publishes versioned directories to gh-pages. |
.doxygen/version-picker.js |
Implements the client-side version dropdown by fetching versions.json and navigating between versions. |
.doxygen/Doxyfile |
Includes version-picker.js as an extra HTML asset in the Doxygen output. |
.doxygen/header.html |
Loads version-picker.js via a deferred script tag. |
.doxygen/lootlocker-theme.css |
Styles the version picker to match the existing top navigation theme. |
… dir URLs, hash preservation; fix dispatch-on-main to deploy latest/
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of lootlocker/index#1465.
What this does
Adds GitHub Pages deployment to the existing
generate-docs.ymlworkflow so reference docs are publicly hosted at a stable URL, with full version history.New:
deploy-pagesjobpushtomain,release(published), andworkflow_dispatch— not on PRsgh-pagesbranch:latest/— updated on every push to main / dispatchv<tag>/— additionally deployed on release eventsversions.jsonat the site root (semver-sorted descending,latestalways first) so the version picker can discover all published versionsindex.htmlthat meta-redirects tolatest/New:
version-picker.js<script defer>inheader.htmlversions.jsonfrom the site root, replaces the static#ll-topnav-versionspan with a<select>dropdownversions.jsonis absent (local builds — existing static badge is kept as-is)CSS + Doxyfile
lootlocker-theme.css: extends the existing#ll-topnav-versionrule to also style#ll-version-picker; adds<select>-specific resets and hover/focus stylesDoxyfile: addsversion-picker.jstoHTML_EXTRA_FILESAfter merging
A repo admin needs to enable GitHub Pages in Settings → Pages:
gh-pages// (root)Then trigger a
workflow_dispatchonmainto populatelatest/for the first time. The backend team will subsequently proxyref.lootlocker.com/unreal/*→ the Pages URL.Files changed
.github/workflows/generate-docs.ymlpushtrigger; adddeploy-pagesjob.doxygen/version-picker.js.doxygen/Doxyfileversion-picker.jstoHTML_EXTRA_FILES.doxygen/header.html<script defer>forversion-picker.js.doxygen/lootlocker-theme.css<select>styles for version picker