Skip to content

Update production script #1280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update production script #1280

wants to merge 1 commit into from

Conversation

mdlinville
Copy link
Contributor

@mdlinville mdlinville commented Apr 25, 2025

The previous fix for broken images in PR previews was overly broad and has resulted in incorrect domains in the English sitemap. This was because I made some incorrect assumptions about the Cloudflare environment variables. This PR aims to correct the problems introduced by that fix.

  • Improve the check for whether we are in Cloudflare
  • Determine if we are building main or a PR preview
  • Echo the Cloudflare variables for debugging
  • Only set a specific Hugo build context if we are in a PR preview
  • Improve how the sitemap is moved around
  • More code comments

To test:

  • Review the Cloudflare build logs for this PR. The output should show all the variables and make the correct statements. (Example)
  • Check out the PR branch locally and run scripts/production.sh. The build output should correctly detect that we are building locally.
  • To test the main deploy with this fix, I think we need to merge this PR.

@mdlinville mdlinville requested a review from a team as a code owner April 25, 2025 22:41
Copy link

cloudflare-workers-and-pages bot commented Apr 25, 2025

Deploying docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: f4dc0d1
Status: ✅  Deploy successful!
Preview URL: https://df2b8f9a.docodile.pages.dev
Branch Preview URL: https://update-production-sh.docodile.pages.dev

View logs

- Improve the check for whether we are in Cloudflare
- Determine if we are building main or a PR preview
- Echo the Cloudflare variables for debugging
- Only set a specific Hugo build context if we are in a PR preview
- Improve how the sitemap is moved around
- More code comments
@mdlinville mdlinville force-pushed the update_production_sh branch from 6728df7 to f4dc0d1 Compare April 25, 2025 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant