Skip to content

Create deploy.yml

Create deploy.yml #1

Workflow file for this run

name: CI/CD Pipeline for Multi-Container Azure Web App
on:
push:
branches:
- main # Trigger on pushes to the main branch
- msg-format-single-obj
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the code
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Log in to Docker Hub
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# Step 3: Build and Push Docker Images
- name: Build and Push Docker Images
run: |
docker-compose -f docker-compose.yml build
docker-compose -f docker-compose.yml push
# Step 4: Deploy to Azure Web App
# - name: Deploy to Azure Web App
# uses: azure/webapps-deploy@v2
# with:
# app-name: "nhmzh-viz-services"
# slot-name: "dev"
# publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
# images: |
# yschindel/viz_ifc:latest
# yschindel/viz_lca-cost:latest
# yschindel/minio:latest