Repository navigation
fix: keep .nojekyll and CNAME on redeploy (release 3.1.2) - #217
Merged
Merged
Conversation
The cleanup hook from #207 removes every tracked file that is not in dist. gh-pages writes .nojekyll and CNAME into its clone, not into dist, so a redeploy removed the .nojekyll that gh-pages had just created and GitHub Pages ran Jekyll again. CNAME survived only because gh-pages' own remove step unstages non-dot files first. The hook now keeps the files gh-pages generates for the active options. A leftover .nojekyll is still removed when nojekyll is disabled. CI deploys every Angular version twice and checks for .nojekyll.
- CI checks the exact file name (git cat-file -e) and asserts that the second deploy created a commit - generatedFiles is a required parameter of createCleanupBeforeAddHook - unit tests for the hook with a mocked git - comments describe the current behaviour
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.
Since 3.0.3, a second deploy removes
.nojekyllfrom the gh-pages branch, so GitHub Pages runs Jekyll again (files and folders starting with_disappear).Cause: the cleanup hook from #207 removes every tracked file that is not in dist. gh-pages writes
.nojekyllandCNAMEinto its clone, not into dist.CNAMEsurvived only because gh-pages' own remove step unstages non-dot files first.Fix: the hook keeps the files gh-pages generates for the active options. A leftover
.nojekyllis still removed when--no-nojekyllis set.Tests:
.nojekyllandCNAME(fails without the fix).nojekyll.nojekyllBumps the version to 3.1.2.