matiasjMusante
matiasjMusante
CDCloudflare Developers
Created by matiasjMusante on 5/12/2024 in #pages-help
Is there a way to run BUILDS (e.g., npm run build) without them counting as DEPLOYMENTS
TL;DR: Is there a way to run BUILDS (e.g., npm run build) without them counting as DEPLOYMENTS (500 free limit)? Hey, I've been diving into Cloudflare Pages and making good progress, but I've got a question I can't seem to figure out. What's the way to run builds (to produce static pages with any framework featuring SSG functionalities, like Next.js, Astro, etc.) without having to deploy everything? I tried deployment hooks, but it seems they execute the entire deployment process, which I assume counts towards the limit. I read about using Wrangler publish, but upon checking the guide, it seems those options have changed. I'll keep researching, but maybe someone can lend me a hand with this. The general idea of the project is that I use a framework to generate static pages, with a command similar to npm run build or npx run build, etc. I'd like to be able to run just the build without going through the entire deployment process, which, besides counting towards the monthly deployment limit (500 free tier and 5000 paid), seems unnecessary. For example, I noticed that every deployment clones the GitHub repo and runs npm install, right? Thanks a lot; I hope you can assist me.
2 replies
CDCloudflare Developers
Created by matiasjMusante on 5/4/2024 in #pages-help
Do static export from NEXTJS pa ges count towars function usage?
I understand that even static generated sites at build time count towards fuinction usage. :NotLikeThis: Do sites generated using output: export (nextjs´s HTML export) also use functions when being visited by users?
1 replies
CDCloudflare Developers
Created by matiasjMusante on 4/30/2024 in #pages-help
SSR SSG function usage
Hello, I've been experimenting with next on pages, but I see that its architecture implies that every visit to the site consumes some request: https://community.cloudflare.com/t/loading-static-page-counts-towards-function-request/535651 So, as I understand it, it's because it calls a worker to somehow route to a particular route. So I started reading about Astro for SSG and SSR. My idea is, having an API set up from cached information, KV, or d1, to be able to generate static pages if I create an API and do a build or similar, and at the same time be able to add, through some form, an authentication system, for example, with lucia.auth. Does anyone have an idea if the same thing happens using Astro?
1 replies