Release to Prod #7
This file contains 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
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy | |
# More GitHub Actions for Azure: https://github.com/Azure/actions | |
# More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions | |
name: Release to Prod | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: 'Environment to release' | |
type: environment | |
required: true | |
jobs: | |
release-to-prod: | |
name: Release to prod | |
runs-on: ubuntu-latest | |
environment: | |
name: ${{ inputs.environment }} | |
steps: | |
- name: Log into Azure CLI | |
uses: azure/[email protected] | |
with: | |
creds: ${{ secrets.CREDS }} | |
- name: Declare environment | |
run: | | |
echo "Environment: ${{ inputs.environment }}" | |
- name: Set web app url | |
run: | | |
echo "Setting web app url to ${{ secrets.WEBAPP_URL }}" | |
echo "WEBAPP_URL=${{ secrets.WEBAPP_URL }}" >> $GITHUB_ENV | |
- name: Swap slots | |
run: az webapp deployment slot swap -s staging -n ${{ secrets.WEBAPP_NAME }} -g ${{ secrets.RESOURCE_GROUP }} |