Merge pull request #800 from CareTogether/move-timezone-conversions #215
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://go.microsoft.com/fwlink/?linkid=2134798 | |
# More GitHub Actions for Azure: https://go.microsoft.com/fwlink/?linkid=2135048 | |
name: CD - Production - .NET API | |
concurrency: | |
group: continuous_delivery_api | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'src/caretogether-pwa/**' | |
- 'src/b2c/**' | |
- 'README.md' | |
- 'LICENSE' | |
- '.gitignore' | |
- '.github/workflows/cd-prod-react.yml' | |
- '.github/workflows/ci-pr-dotnet.yml' | |
- '.github/workflows/ci-pr-react.yml' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repo | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
# Connect to Azure Container Registry | |
- uses: azure/docker-login@v1 | |
with: | |
login-server: caretogether.azurecr.io | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
# Build and publish the .NET backend container via dockerfile | |
- run: | | |
docker build -f src/CareTogether.Api/Dockerfile -t caretogether.azurecr.io/caretogether-api:${{ github.sha }} . | |
docker push caretogether.azurecr.io/caretogether-api:${{ github.sha }} | |
# Deploy .NET backend container | |
- name: Deploy .NET API to Azure | |
uses: azure/webapps-deploy@v2 | |
with: | |
app-name: caretogether-api | |
slot-name: Production | |
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_CARETOGETHER_API }} | |
images: 'caretogether.azurecr.io/caretogether-api:${{ github.sha }}' |