action-hosting-deploy icon indicating copy to clipboard operation
action-hosting-deploy copied to clipboard

Deploy to multiple environments

Open lukepighetti opened this issue 3 years ago • 6 comments

Let's say we want to deploy a preview of one commit to two environments. In our build step we will provide different API base urls for each envirnoment, dev and qa.

Is there any way to achieve this?

I suspect we can do two deploy steps, but it's not clear how we display in each message which environment the link is for.

lukepighetti avatar Mar 16 '21 11:03 lukepighetti

it looks like you might be able to squeak by with channelId: "${{ github.event.number }}-dev", would love some feedback

lukepighetti avatar Mar 16 '21 11:03 lukepighetti

related code: https://github.com/FirebaseExtended/action-hosting-deploy/blob/3a9069e021e490f212ba5f99591495fa5bbe8e1b/src/getChannelId.ts

lukepighetti avatar Mar 16 '21 11:03 lukepighetti

Looks like this cannot be done without some guidance from firebase team, because if you do two builds like this it will just keep replacing the first github-actions comment containing the link. We need a way to specify multiple previews for multiple environments.

lukepighetti avatar Mar 16 '21 11:03 lukepighetti

I'll just add that I was also looking for this functionality.

jmcdl avatar Apr 05 '21 14:04 jmcdl

I'll just add that I was also looking for this functionality.

It's possible this is rolled into having multiple deploy domains and works automatically. I never got around to finding out if that was the case.

lukepighetti avatar Apr 05 '21 20:04 lukepighetti

Looks like this cannot be done without some guidance from firebase team, because if you do two builds like this it will just keep replacing the first github-actions comment containing the link. We need a way to specify multiple previews for multiple environments.

I found your comment while trying to fix a similar issue – I think the fix is described here https://github.com/FirebaseExtended/action-hosting-deploy/issues/143#issuecomment-921789605

tcrwt avatar Sep 17 '21 13:09 tcrwt