Merged
Conversation
The property was set to an absolute path `/docs/_assets/generated/react-ui.development.css`, which resolves against the domain root and bypasses the PR preview subdirectory. A small setup script now derives the URL from the co-located `react-ui*.js` bundle so that previews always load the correct CSS for the deployed branch.
Deleting a GitHub environment requires admin-level repository access. The built-in `GITHUB_TOKEN` is a GitHub App installation token and cannot perform this operation regardless of the `deployments: write` permission granted to the workflow. The `rossjrw/pr-preview-action` step already handles all necessary cleanup on `gh-pages`.
Contributor
|
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.
Fixes two issues in the PR preview deployment workflow introduced in #701.
--docoff-preview-cssloads wrong CSS in previews--docoff-preview-csswas set to/docs/_assets/generated/react-ui.development.css— a root-relative path that always resolves against the domain root. In PR preview deployments served under a subdirectory (/react-ui/pr-preview/pr-{number}/), this caused the main site's CSS to be loaded instead of the preview's, leaving any styles not yet in a release unapplied.A small setup script (
setupDocoff.js) now derives the correct CSS URL from the co-locatedreact-ui*.jsbundle'ssrc, and sets--docoff-preview-cssvia JS before docoff initialises. The hardcoded property inextra.cssis commented out with a reference to react-ui-org/docoff#50, which tracks the upstream fix.Cleanup step fails with 403
The
Delete preview environmentstep in the cleanup job calledDELETE /repos/.../environments/{name}, which requires admin-level repository access. The built-inGITHUB_TOKENis a GitHub App installation token and cannot perform this operation regardless of thedeployments: writepermission granted to the workflow. The step has been removed —rossjrw/pr-preview-actionwithaction: removealready handles all necessary cleanup ongh-pages.