feature importanceV3 #61
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
name: Build and deploy to production | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout GitHub Actions | |
uses: actions/checkout@main | |
- name: Login via Azure CLI | |
uses: azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Login to Azure Container Registry | |
uses: azure/docker-login@v1 | |
with: | |
login-server: fastapicd2024.azurecr.io | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Build and push container image to registry | |
run: | | |
docker build . -t fastapicd2024.azurecr.io/fastapi-cd:${{ github.sha }} | |
docker push fastapicd2024.azurecr.io/fastapi-cd:${{ github.sha }} | |
- name: Deploy to App Service | |
uses: azure/webapps-deploy@v2 | |
with: | |
app-name: 'fastapi-cd-webAPP' | |
images: 'fastapicd2024.azurecr.io/fastapi-cd:${{ github.sha }}' | |
#slot-name: 'staging' | |
- name: Azure logout | |
run: | | |
az logout |