I'm in the process of deploying our Flutter Web
app to storage account within Azure, this particular storage account has had the Static website option enabled, doing so creates a $web
container for me to deploy my site, uploading my files works perfectly fine and I'm able to see the website.
When I try to automate this with CICD is doesn't allow / can't see the $web
container, if I switch out $web
for a test container it works.
Does anyone know or even seen this issue before when trying to deploy a static website to the $web container, below is the part of the workflow file that does the upload:
- name: Deploy to Azure Storage Static Website
uses: azure/CLI@v1
with:
azcliversion: 2.0.72 # Use the desired Azure CLI version
inlineScript: |
az login --service-principal --username ${{ secrets.AZURE_CLIENT_ID }} --password ${{ secrets.AZURE_CLIENT_SECRET }} --tenant ${{ secrets.AZURE_TENANT_ID }}
az storage blob upload-batch --destination "\$web" --destination-path . --source build/web
env:
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_ACCOUNT_CONNECTION_STRING }}
According to This Document, the
$web
container is a reserved container name for static website hosting in Azure Storage. When you enable static website hosting, Azure Storage creates this container for you automatically.$web
is the Default root container that is used to store static websites files. And,And This document - Use GitHub Actions to deploy a static site to Azure Storage | Microsoft Learn also uses
-d '$web'
without forward-slash. I referred the github action workflow and steps from this Document below:-My github workflow:-
Output:-