简体   繁体   中英

Deploy to Unique Azure Function App Deployment Slot and Return URL with Github Actions

We are currently using Static Web Apps for our front end web client with an independent Azure Function App supporting the API requests.

The production Azure Function App URL does not change and as a result we are able to deploy consistently to the production Static Web App and independent Azure Function app using Github Actions.

We would like to mirror the dynamic Static Web App deployments with Azure Function App deployment slots for our non-production environments. We would like to dynamically create a staging environment for each PR created in Github.

Is it possible to deploy to a unique dynamic Azure Function App deployment slot and return the Function App hosted URL via Github Actions back to Static Web Apps configuration?

Is it possible to deploy to a unique dynamic Azure Function App deployment slot and return the Function App hosted URL via Github Actions back to Static Web Apps configuration?

In my view, it is possible to create the Slot in Azure Function App as a Staging Environment and you can push every (Code Release) to the Staging Slot Environment.

There is a feature called "Swapping" and 2 kinds of swapping ie, swap and auto-swap.

If you want to create many slots (staging environments), which is called Scaling the Slots. This Slot Scales when the Function app scale in Consumption Plan and in app service plans, Slots runs on fixed number of workers running in that plan.

You have to deploy the Azure Function App either in App Service Plans or Premium Hosting Plan for scaling the slots because only one deployment slot allowed in Consumption Plan and can enable the auto-swap for pushing code to production from staging environments for every code release.

Refer to the MS Doc for more information on Scaling the slots in Azure Function Apps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM