Skip to content

feat: take the Pelican Panel version from GitHub at build time - #244

Merged
alexevladgabriel merged 5 commits into
feat/fumadocs-nextfrom
feat/docs-live-version
Nov 20, 2026
Merged

alexevladgabriel merged 5 commits into
feat/fumadocs-nextfrom
feat/docs-live-version

Conversation

@alexevladgabriel

@alexevladgabriel alexevladgabriel commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

llms.txt and the homepage say Pelican Panel 1.0.0-rc.2 because the version was typed by hand, while GitHub's latest release is already rc.4 (19 November 2026). This reads the version from GitHub when the docs are built, and rebuilds them daily, so the version stays current without anyone editing it.

What changes

  • scripts/sync-release.mjs runs before the build and writes the latest pelican/panel release (drafts skipped, prereleases kept) to data/release.json. It has a 5 s timeout. On any failure it logs one line and the build uses the typed values in lib/home-data.ts.
  • llms.txt, llms-full.txt, the announcement bar, "Latest release" and the footer use it.
  • The publish workflow also runs once a day, which rebuilds pelican.dev exactly like a push to main. The build step gets GITHUB_TOKEN so the release lookup isn't rate-limited.

Checked

  • bun test: 165 pass. bun run typecheck: ok.
  • bun run build passes; out/llms.txt says "Current version: 1.0.0-rc.4."
  • With GitHub unreachable (a dead proxy): one warning line, the script exits 0 and writes {}, so the build uses rc.2.

Not checked

…build

sync-release writes data/release.json (version, date, link). 5 s timeout,
one retry; any failure prints one line and leaves the committed fallback,
so the build never fails or waits on GitHub.
… GitHub

home-data reads data/release.json and keeps its typed rc.2 values as the
fallback. The announcement bar keeps its rc.2 sentence only for rc.2.
…in a day

Adds a schedule that publishes the same branches a push does, passes
GITHUB_TOKEN to the build, and names the built branch and commit in
BUILD.json (BUILD_SHA/BUILD_BRANCH) since the daily run starts on main.
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0dd93e8f-e90c-4c9d-b322-9df383f2568c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

One fetch with a 5-second timeout, no retry (the build already falls back
and the docs rebuild daily), no custom error class or extra checks. Tests
cover the release picking only. 130 lines down to 50.
The daily run only needs to rebuild pelican.dev, which a scheduled run on main
already does like a push to main. Drops the branch-picking job, the matrix and
the BUILD_SHA/BUILD_BRANCH plumbing in pack-docs.
@alexevladgabriel
alexevladgabriel merged commit 2113c0b into feat/fumadocs-next Nov 20, 2026
4 checks passed
@alexevladgabriel
alexevladgabriel deleted the feat/docs-live-version branch November 20, 2026 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant