Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

fix(playground): base url not propagated to vite #2452

Merged
merged 2 commits into from
Apr 14, 2022

Conversation

NicholasLYang
Copy link
Contributor

@NicholasLYang NicholasLYang commented Apr 14, 2022

Summary

Turns out we don't propagate the base url parameter properly with nested NPM scripts

Test Plan

@NicholasLYang NicholasLYang temporarily deployed to aws April 14, 2022 16:30 Inactive
@github-actions
Copy link

github-actions bot commented Apr 14, 2022

@ematipico
Copy link
Contributor

Is it now possible to contain the playground deploy only when the actual playground changes?

@NicholasLYang
Copy link
Contributor Author

NicholasLYang commented Apr 14, 2022

I can try adding that back, although we do want to deploy when the rust code changes too, because the whole point is that you can play around with people's changes to the code with the link to the commit. So really, the only changes where we wouldn't want to deploy would be small changes to non-code or to the website.

@ematipico
Copy link
Contributor

Oh yeah good point, I haven't though about it! It makes totally sense then!

Comment on lines 39 to 43
- run: pnpm --prefix website/playground build:wasm

# We don't run the general build script because we need to pass in the base flag
# directly to the vite command.
- run: pnpm --prefix website/playground build:js --base=/${{ steps.sha.outputs.sha }}/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://stackoverflow.com/a/51594722

Seems like another option but is probably more obscure than your fix.

@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: e5daa1b
Status:⚡️  Build in progress...

View logs

@NicholasLYang NicholasLYang temporarily deployed to aws April 14, 2022 19:43 Inactive
@NicholasLYang NicholasLYang merged commit 03c946e into main Apr 14, 2022
@NicholasLYang NicholasLYang deleted the fix/base-url-in-deploy-playground branch April 14, 2022 19:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants