Uh oh!
There was an error while loading. Please reload this page.
chore: Stop tracking the _site build output - #21
Merged
DannyvdSluijs merged 1 commit intoAug 19, 2026
Conversation
The CI workflow builds the site from source on every push to main (hydephp/action runs `php hyde build` then uploads _site), so the committed output is never read by the deploy. Tracking it only costs us churn and merge conflicts on generated HTML, and lets the two diverge: #19 merged docs source without rebuilding _site, and the output differs depending on whether SITE_URL is set at build time. Worse, the stale files actually reach production. Hyde's CleanSiteDirectory pre-build task calls Filesystem::findFiles() with the default $recursive = false, so it only clears top-level _site/*.html and never _site/docs/. Committed files in subdirectories survive the clean and get uploaded, which is why /docs/docs/community-guide.html and /docs/docs/configuration.html are still live despite having no source in _docs/. Untracking them removes them from the next deploy. Uncomment the /_site rule that was already present in .gitignore and drop the directory from the index. The local build output is left on disk untouched; use `php hyde serve` to preview builds. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 freeto 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.
Stacked on #20 — please merge that first. GitHub will retarget this to
mainautomatically once it lands.Why
CI builds the site from source on every push to
main(hydephp/actionrunsphp hyde build, then uploads_site), so the committed output is never read by the deploy. Tracking it costs us churn and merge conflicts on generated HTML, and lets source and output diverge — #19 merged docs source without rebuilding_site, and the output differs depending on whetherSITE_URLis set at build time.The stale files actually reach production
Hyde's
CleanSiteDirectorypre-build task calls:findFiles()defaults to$recursive = falseand is never passedtrue, so "Removing all files from build directory" only clears top-level_site/*.html— never_site/docs/. Committed files in subdirectories survive the clean and get uploaded with the artifact.That is why these two are live today despite having no source in
_docs/:/docs/docs/community-guide.html/docs/docs/configuration.htmlUntracking removes them from the next deploy. Worth re-checking both return 404 after this merges.
Change
Uncomments the
/_siterule already present in.gitignoreand drops the directory from the index. Local build output is left on disk; usephp hyde serveto preview.Tradeoff
Nothing in the repo will show the built site anymore, so a template regression surfaces only on deploy or via a local serve. If that is a concern, the follow-up is a PR build-check job (
hydephp/actionwithdeploy-to: artifact) — happy to open that separately.🤖 Generated with Claude Code