Merged
Conversation
The quarto-publish workflow was triggering on both 'main' and 'addContent' branches. When a PR from addContent was opened, both workflows would run: 1. PR preview workflow would deploy to gh-pages/pr-preview/pr-XX/ 2. Main deployment workflow would then overwrite the entire gh-pages branch Now the workflow only triggers on 'main' branch pushes, allowing PR previews to persist without being overwritten. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Updated auth-check.js to use dynamic path resolution instead of hardcoded absolute paths. This ensures that: - Main site redirects to /disasters-docs/password-protect.html - PR previews redirect to /disasters-docs/pr-preview/pr-XX/password-protect.html The getBasePath() function extracts the current directory path and constructs the correct login page URL relative to the current location. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
ISSUE: The auth-check.js external script was not being included in deployed HTML pages on PR previews, causing authentication to fail. SOLUTION: 1. Inlined the entire auth-check.js content directly in _quarto.yml under include-in-header. This ensures the script is always embedded in every rendered HTML page. 2. Added verification step to both workflows (preview.yml and quarto-publish.yml) that checks for the presence of the auth script in rendered HTML before deployment. Build fails if script is missing. This guarantees password protection works on all deployments: - Main site (disasters-docs/) - PR previews (disasters-docs/pr-preview/pr-XX/) - Any future branch deployments 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
ISSUE: When visiting URLs like /disasters-docs/pr-preview/pr-37/ (without index.html), the getBasePath() function couldn't find .html in the path, so it fell back to the default /disasters-docs/, causing incorrect redirects to the wrong password-protect.html location. SOLUTION: Simplified getBasePath() to handle three cases: 1. Path ends with / → it's already the base directory 2. Path ends with .html → extract directory by removing filename 3. Otherwise → assume it's a directory, add trailing slash This ensures correct redirects for all URL formats: - /disasters-docs/pr-preview/pr-37/ → /disasters-docs/pr-preview/pr-37/password-protect.html - /disasters-docs/pr-preview/pr-37/index.html → /disasters-docs/pr-preview/pr-37/password-protect.html - /disasters-docs/ → /disasters-docs/password-protect.html 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
|
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.
No description provided.