Downloading data before building pages (SSG/SSR)
I have the use case that I'm experimenting building a Cloudflare Pages project using Astro.
It will using a dynamic GraphQL endpoint which queries data from a D1 database.
However it will also generate static pages (SSG).
For these static pages I have a local SQLite file that will be queries to dynamically create the (static) pages.
Locally on my development machine this works perfectly.
However, I would like to switch to a mode that I automatically re-deploy my site via a push to Github.
Now that local SQLite is ~60MB (zipped ~6MB) and I don't want to upload that Github...
Is it possible to either download that file during the build process, or upload it somewhere before the build kicks off?
Note that the SQLite file (zip) is publicly available so that's not an issue.
I'm looking at the possibilities I have; and what possible limitations are.
It will using a dynamic GraphQL endpoint which queries data from a D1 database.
However it will also generate static pages (SSG).
For these static pages I have a local SQLite file that will be queries to dynamically create the (static) pages.
Locally on my development machine this works perfectly.
However, I would like to switch to a mode that I automatically re-deploy my site via a push to Github.
Now that local SQLite is ~60MB (zipped ~6MB) and I don't want to upload that Github...
Is it possible to either download that file during the build process, or upload it somewhere before the build kicks off?
Note that the SQLite file (zip) is publicly available so that's not an issue.
I'm looking at the possibilities I have; and what possible limitations are.