mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-08-26 06:49:39 +00:00
Remove the Azure App Service build and deployment workflow config
This commit is contained in:
55
.github/workflows/dev_syncrow(dev).yml
vendored
55
.github/workflows/dev_syncrow(dev).yml
vendored
@ -1,55 +0,0 @@
|
|||||||
name: Backend deployment to Azure App Service
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- dev
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
env:
|
|
||||||
AZURE_WEB_APP_NAME: 'syncrow'
|
|
||||||
AZURE_WEB_APP_SLOT_NAME: 'dev'
|
|
||||||
ACR_REGISTRY: 'syncrow.azurecr.io'
|
|
||||||
IMAGE_NAME: 'backend'
|
|
||||||
IMAGE_TAG: 'latest'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build_and_deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Node.js
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: '20'
|
|
||||||
|
|
||||||
- name: Install dependencies and build project
|
|
||||||
run: |
|
|
||||||
npm install
|
|
||||||
npm run build
|
|
||||||
|
|
||||||
- name: Log in to Azure
|
|
||||||
uses: azure/login@v1
|
|
||||||
with:
|
|
||||||
creds: ${{ secrets.AZURE_CREDENTIALS }}
|
|
||||||
|
|
||||||
- name: Log in to Azure Container Registry
|
|
||||||
run: az acr login --name ${{ env.ACR_REGISTRY }}
|
|
||||||
|
|
||||||
- name: List build output
|
|
||||||
run: ls -R dist/
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
|
||||||
run: |
|
|
||||||
docker build . -t ${{ env.ACR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
|
|
||||||
docker push ${{ env.ACR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
|
|
||||||
|
|
||||||
- name: Set Web App with Docker container
|
|
||||||
run: |
|
|
||||||
az webapp config container set \
|
|
||||||
--name ${{ env.AZURE_WEB_APP_NAME }} \
|
|
||||||
--resource-group backend \
|
|
||||||
--docker-custom-image-name ${{ env.ACR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} \
|
|
||||||
--docker-registry-server-url https://${{ env.ACR_REGISTRY }}
|
|
Reference in New Issue
Block a user