# This workflow will build and push a web application to an Azure Static Web App when you change your code.
#
# This workflow assumes you have already created the target Azure Static Web App.
# For instructions see https://docs.microsoft.com/azure/static-web-apps/get-started-portal?tabs=vanilla-javascript
#
# To configure this workflow:
#
# 1. Set up a secret in your repository named AZURE_STATIC_WEB_APPS_API_TOKEN with the value of your Static Web Apps deployment token.
# For instructions on obtaining the deployment token see: https://docs.microsoft.com/azure/static-web-apps/deployment-token-management
#
# 3. Change the values for the APP_LOCATION, API_LOCATION and APP_ARTIFACT_LOCATION, AZURE_STATIC_WEB_APPS_API_TOKEN environment variables (below).
# For instructions on setting up the appropriate configuration values go to https://docs.microsoft.com/azure/static-web-apps/front-end-frameworks
name:Deploy web app to Azure Static Web Apps
on:
push:
branches:
-"main"
pull_request:
types:[opened,synchronize,reopened,closed]
branches:
-"main"
# Environment variables available to all jobs and steps in this workflow
env:
APP_LOCATION:"/etc/quiz-app"# location of your client code
OUTPUT_LOCATION:"dist"# location of client code build output
AZURE_STATIC_WEB_APPS_API_TOKEN:${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_VICTORIOUS_SAND_043CA7603 }}# secret containing deployment token for your static web app
permissions:
contents:read
jobs:
build_and_deploy_job:
permissions:
contents:read# for actions/checkout to fetch code
pull-requests:write# for Azure/static-web-apps-deploy to comment on PRs