Static-web-apps: Option For Manual Deployment (Outside Of Actions)

Created on 15 Jul 2020  路  4Comments  路  Source: Azure/static-web-apps

Not sure if this feature exists and I just couldn't find it, but it would be nice to have the option to build both your static site, and function app locally, and then deploy them directly from your computer, bypassing GitHub Actions. For instance, right now, Github Actions is experiencing an outage, and will not trigger for us, so we are left in the lurch and unable to deploy a needed patch out to our site:

image

It would be nice if we had multiple ways of getting the necessary files up to the hosting provider, as back ups in case of outages like this. For instance if instead of using this service, we had set up a Function App service for our back end, and a Blob Storage service as our static hosting option for our front end, we would've been able to bypass github actions by deploying directly from the Visual Studio Code extensions for each respectively, or I believe through their azure portal interfaces. It would be nice to have the equivalent for the Static Web App service:

Function App | Blob Storage
------------ | -------------
image | image
image | image

Most helpful comment

We are working on adding options here, totally agree on providing alternatives when Github is down.

All 4 comments

We are working on adding options here, totally agree on providing alternatives when Github is down.

Nice : Provide below options too:

  • Publish directly from Visual Studio or VS Code using Publish Profiles like in App Service
  • Instead of Github , provide options for Azure Devops pipeline or Azure Repos. Make the usage of Azure Devops and Azure Repos free for Azure static web apps.
  • When Azure Static Web App reach's GA (General Availability), if possible consider the pricing to be cheap like Godaddy. So I can recommend it to others. :smile:.
  • Publish directly from Visual Studio or VS Code using Publish Profiles like in App Service

Similar to this, I would like to see zip deploy and/or ARM deploy available.

In my case, I have a static site with Python functions referencing private packages hosted on GitHub. When deploying the functions outside of Static Web Apps, I have to install the Python packages locally and specify --no-build when publishing to Azure Functions. I don't think that is available through Static Web Apps yet, but this would be a much nicer solution than independently deploying the static site, function app, CDN, etc. in an ARM template.

In the meantime, the following will allow you to do it with docker.

You can pass the parameters for StaticSitesClient directly to the binary inside of the container used by the GitHub Action.

Review valid parameters

docker run --entrypoint "/bin/staticsites/StaticSitesClient" \
  mcr.microsoft.com/appsvc/staticappsclient:stable upload --help

Example of a manual deployment of a local build

docker run --entrypoint "/bin/staticsites/StaticSitesClient" \
  --volume "$(pwd)"/build:/root/build \
  mcr.microsoft.com/appsvc/staticappsclient:stable \
  upload \
  --skipAppBuild true \
  --app /root/build \
  --apiToken <token>
Was this page helpful?
0 / 5 - 0 ratings