Deploy to Azure App Service #199
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
| 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 |