Created
March 4, 2024 12:36
-
-
Save Shaxadhere/7681937a82527386722bad775919cf23 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: node:18 | |
pipelines: | |
branches: | |
release/prod: | |
- step: | |
deployment: production | |
name: Build and Deploy to Azure Blob Storage | |
caches: | |
- node | |
script: | |
# Install dependencies and build your static website | |
- npm install && CI=false | |
- npm run build | |
# Authenticate with Azure using Azure CLI | |
- apt-get update && apt-get install -y azure-cli | |
- az login --service-principal --username $AZURE_CLIENT_ID --password $AZURE_CLIENT_SECRET --tenant $AZURE_TENANT_ID | |
# Set Azure subscription | |
- az account set --subscription $AZURE_SUBSCRIPTION_ID | |
# Upload static website files to Azure Blob Storage | |
- az storage blob sync --container '$web' --account-name $AZURE_STORAGE_ACCOUNT_NAME --account-key $AZURE_STORAGE_ACCOUNT_KEY --source './build' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment