cloudflare / pages-action

🛑 DEPRECATED, please use wrangler-action
MIT License
476 stars 100 forks source link

Using CF_PAGES_URL #128

Closed daviddavo closed 4 months ago

daviddavo commented 6 months ago

To deploy something like Hugo pages, I need to set the baseURL, can I access the CF_PAGES_URL env variable?

AgustinRamiroDiaz commented 4 months ago

I think it's only available as the url output

I think this means that you'd need to deploy twice in order to get the url on the first deploy, and then update it in the second one

nprogers commented 4 months ago

The second deployment will also have its own unique URL, different from the first. CF_PAGES_URL environment variable is only available during build time within the Pages CI system. I suggest using a branch alias to find the deterministic URL

https://github.com/marketplace/actions/cloudflare-pages-branch-alias