Skip to content

Deploy to Azure App Service #199

Deploy to Azure App Service

Deploy to Azure App Service #199

name: Deploy to Azure App Service
on:
workflow_run:
workflows: ["Build, Test, and Publish"]
types:
- completed
permissions:
actions: read
contents: read
concurrency:
group: "deploy-to-azure"
cancel-in-progress: true
jobs:
deploy:
if: vars.RUN_DEPLOY_TO_AZURE_APP_SERVICE == 'true' && github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: ./build
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy to Azure Web App
uses: azure/webapps-deploy@v2
with:
app-name: ${{ secrets.AZURE_APP_SERVICE_NAME }}
slot-name: 'production'
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: ./build