feat: deploy #89
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: CI/CD Pipeline | |
# on: | |
# push: | |
# branches: | |
# - main | |
# pull_request: | |
# branches: | |
# - main | |
# jobs: | |
# build-and-deploy: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v2 | |
# - name: Set up Docker Buildx | |
# uses: docker/setup-buildx-action@v1 | |
# - name: Log in to Azure Container Registry | |
# uses: azure/docker-login@v1 | |
# with: | |
# login-server: <YourACRName>.azurecr.io | |
# username: ${{ secrets.AZURE_ACR_USERNAME }} | |
# password: ${{ secrets.AZURE_ACR_PASSWORD }} | |
# - name: Build and push backend Docker image | |
# run: | | |
# docker-compose -f docker-compose.yml build backend | |
# docker tag myapp_backend:latest <YourACRName>.azurecr.io/myapp_backend:latest | |
# docker push <YourACRName>.azurecr.io/myapp_backend:latest | |
# - name: Build and push frontend Docker image | |
# run: | | |
# docker-compose -f docker-compose.yml build frontend | |
# docker tag myapp_frontend:latest <YourACRName>.azurecr.io/myapp_frontend:latest | |
# docker push <YourACRName>.azurecr.io/myapp_frontend:latest | |
# - name: Deploy to Azure Web App | |
# uses: azure/webapps-deploy@v2 | |
# with: | |
# app-name: <YourAppServiceName> | |
# slot-name: production | |
# images: | | |
# <YourACRName>.azurecr.io/myapp_backend:latest | |
# <YourACRName>.azurecr.io/myapp_frontend:latest |