Astro Pages do not migrate to Workers Assets
It's weird. There's some build configuration issue. You can replicate it easily. Create a new project on Pages using Astro. set it up so that it builds on push to Github. Then, use that repository as a Workers Assets project. There is no way you can configure it, that I have found in code or admin, that will build.
22 Replies
I just wanted to highlight this as a thread, since it was aptly noted by @James that he believed it was straightforward to migrate, it is currently not possible. This thread is to track discussion going forward and to hopefully find some migration strategy for Astro on Pages to Astro on Workers Assets.
The steps I outlined above are replication steps from scratch. I'm here to answer any questions if I was vague or unclear in replication steps. Should I file a bug report somewhere? I am willing to do so.
Thank you for your attention and help!
Unknown Userโข4w ago
Message Not Public
Sign In & Join Server To View
Thank you thank you! I will check this out ๐
Unknown Userโข4w ago
Message Not Public
Sign In & Join Server To View
okay im a little confused too now
both
_worker.js
are IDENTICAL this makes no senseUnknown Userโข4w ago
Message Not Public
Sign In & Join Server To View
i really wonder how the ci/cd would know its pages now. the repos are identical
oh
thats it
Unknown Userโข4w ago
Message Not Public
Sign In & Join Server To View
i just didnt check the public folder
Unknown Userโข4w ago
Message Not Public
Sign In & Join Server To View
@RobbBoss https://github.com/Sillyvan/astro-pages-to-assets/commits/main/ the 2 commits are all you need
remove pages from the scripts
remove pages_build_output_dir from wrangler
add a main and an assets to wrangler
add the .assetsingore in ./public
GitHub
Commits ยท Sillyvan/astro-pages-to-assets
Contribute to Sillyvan/astro-pages-to-assets development by creating an account on GitHub.
Unknown Userโข4w ago
Message Not Public
Sign In & Join Server To View
you can. i added pnpm build in the dashboard
either way i guess
Unknown Userโข4w ago
Message Not Public
Sign In & Join Server To View
Brilliant! Thank you!!! I had to run to a meeting but I'm back in this now, and wow thank you, this looks like it will probably work for me, too. I'll check it out now and report back. Thank you thank you!!
Unknown Userโข4w ago
Message Not Public
Sign In & Join Server To View
i didnt have one. it was literally just the missing .assetsignore
Unknown Userโข4w ago
Message Not Public
Sign In & Join Server To View
but i got that error without pages entries. take the astro assets example and delete the .assetsignore. it will show that error
its just an outdated error or something
This seems to be what I was missing, as well. Also the bindings needed to be updated, I had missed that originally, too.
...I'm dealing with a conflicted merge right now, though, ...which is super fun times.
I'll be able to update shortly ๐ค๐ฝ๐ค๐ฝ
Alright! I think that was the thing. It looks like we're building now. ๐ ๐
You two are brilliant! Thank you so much for your concerted efforts @Silvan @FlikTeoh !!! ๐๐ฝ
This should be the official instruction, or at least a guidepost for creating tooling. I'll have a go at that this afternoon. Brilliant work, I had been having so many issues. thank you
you are welcome. cf docs are too massiv i mostly learned by trying and praying but slowly things make sense
I think I needed to have that wrangler.jsonc file in the root of the project, too, and I had not added that in yet, since my build process was creating that for me for Pages, apparently. So that was necessary, too, I think, but without the .assetsignore in the /public dir I was shooting in the dark. I never would have looked in there.
...
I should have probably done a diff on the directories, but I wasn't building them locally, I was using IDX in a remote instance. maybe a reason to go back to vim? alas.
brilliant effort and it was, I think, much needed for the good of all. I think you both probably helped way more than me today. ๐๐ฝ๐