Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Create web-deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rlawhddbs authored Aug 26, 2024
1 parent 67ab8cf commit 8effa7b
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/web-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: If push to the main, deploy it

on:
push:
branches:
- main
# paths:
# - "canbus-web/**"

jobs:
build:
runs-on: ubuntu-latest

env:
TEAM_NAME: woowasiblings
APP_NAME: canbus-web
APP_ENV: canbus-web-env
RG_NAME: rg-2024-Woowa-Siblings

steps:

- name: Check out code
uses: actions/checkout@v2

- name: Log in to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Build and deploy Container App
uses: azure/container-apps-deploy-action@v0
with:
appSourcePath: ${{ github.workspace }}/$APP_NAME
acrName: $TEAM_NAME
acrUsername: ${{ secrets.ACR_USERNAME }}
acrPassword: ${{ secrets.ACR_PASSWORD }}
containerAppName: $APP_NAME
containerAppEnvironment: $APP_ENV
resourceGroup: $RG_NAME
imageToBuild: $TEAM_NAME.azurecr.io/$APP_NAME:${{ github.sha }}
dockerfilePath: Dockerfile

- name: Azure Container Apps Ingress Setting
run: az containerapp ingress update --name $APP_NAME --resource-group $RG_NAME --target-port 3000 --allow-insecure

0 comments on commit 8effa7b

Please sign in to comment.