PR Preview: update to exclude pr-previews folder on deploy to GH pages#535
Merged
itsmedavep merged 1 commit intomainfrom Mar 20, 2026
Merged
PR Preview: update to exclude pr-previews folder on deploy to GH pages#535itsmedavep merged 1 commit intomainfrom
itsmedavep merged 1 commit intomainfrom
Conversation
|
flacoman91
approved these changes
Mar 20, 2026
Collaborator
flacoman91
left a comment
There was a problem hiding this comment.
let's give it a try and revert if it doesnt work
anselmbradford
approved these changes
Mar 20, 2026
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.
@billhimmelsbach @contolini @anselmbradford
Looking into why the PR preview GH action links work for a while then 404 I think I found the culprit. I do not believe it to be an issue with the PR preview action but a repo GH actions setup issue.
Essentially, the repo has competing GH actions that perform differing tasks. Those being build-and-deploy.yml and pr-preview.yml.
Build and deploy triggers after every push to main and builds the website and deploys it to gh-pages branch. PR preview builds the changes on a PR and then pushes that to a folder on the gh-pages branch after every PR event (it also will remove the preview on close of PR).
The crux of it is that build-and-deploy in the deploy step overwrites the entire gh-pages branch. That GH action triggers on every push to main. Following that logic the solution becomes, don't overwrite the pr-preview folder on the branch (gh-pages) we are deploying to.
Changes
https://github.com/JamesIves/github-pages-deploy-action/tree/v4/
👇
How to test this PR
Screenshots
Notes