This action is uploading a build artifact to azure blob and activates the entrypoint at last so that zero downtime is possible. It is designed to use the Azure CLI to upload a directory of your choice to your Azure Blob Storage account and upadte the index.html at the last file. This leads to a zero downtime option.
Place in a .yml
file such as this one in your .github/workflows
folder. Refer to the documentation on workflow YAML syntax here.
name: Upload SPA To Azure Blob Storage
on:
push:
branches:
- main
jobs:
upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: CoreHelpers/upload-artifact-to-azure-blob@main
with:
connectionstring: ${{ secrets.ConnectionString }}
container: publicweb
artifact: artifactname
If you want to synchronize local and remote state (for example, if you are publishing a static website), enable the sync
flag.
Key | Value |
---|---|
connectionstring |
The connection string to the storage account |
container |
The container name the file should be uploaded to |
artifact |
The name of the artifact you want to upload |
This project is distributed under the MIT license.