cloudflare / wrangler-action

🧙‍♀️ easily deploy cloudflare workers applications using wrangler and github actions
Apache License 2.0
1.26k stars 159 forks source link

⏪️ Restore previous Action outputs `deployment-url` and `deployment-alias-url` for Pages deployments #308

Closed tiangolo closed 3 weeks ago

tiangolo commented 1 month ago

⏪️ Restore previous Action outputs deployment-url and deployment-alias-url for Pages deployments

Description

When a deployment is a Pages deployment, https://github.com/cloudflare/wrangler-action/pull/303 (accidentally, I think) removed the exiting GitHub Action output deployment-url and deployment-alias-url.

This was released in version 3.10 and caused https://github.com/cloudflare/wrangler-action/issues/307

I found it while debugging how I use it in the FastAPI docs previews: https://github.com/fastapi/fastapi/pull/12526#issuecomment-2434910233

Solution

This PR restores including the existing output variables even when the command is a Pages deployment (keeping the new output variables too). It also documents the new output of the Action in the action.yml schema.

Next Steps

Not sure about the process for testing, not sure if this would be included in your tests, I'll leave this up to you.

Feel free to take over this PR and add things on top, or copy the code somewhere else, etc. All's good. :sweat_smile:

I think the first person to give this a first review would be @courtney-sims :nerd_face:

Maximo-Guk commented 1 month ago

Hi @tiangolo, thank you! Could you add a changeset, please?

For reference

tiangolo commented 1 month ago

Thanks @Maximo-Guk, I just did.

I see you reverted the original change in https://github.com/cloudflare/wrangler-action/pull/309. As there's another issue related to this change I suspect you might want to re do it all in a different way, so feel free to close this one.

Maximo-Guk commented 3 weeks ago

Thanks @tiangolo , I've opened up #312 , where we're going to definitely support deployment-url and deployment-alias-url!