mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 10:54:55 +00:00
Merge branch 'dev' of https://github.com/SyncrowIOT/backend into dev
This commit is contained in:
14
.github/workflows/dev_syncrow(dev).yml
vendored
14
.github/workflows/dev_syncrow(dev).yml
vendored
@ -11,7 +11,7 @@ env:
|
|||||||
AZURE_WEB_APP_SLOT_NAME: 'dev'
|
AZURE_WEB_APP_SLOT_NAME: 'dev'
|
||||||
ACR_REGISTRY: 'syncrow.azurecr.io'
|
ACR_REGISTRY: 'syncrow.azurecr.io'
|
||||||
IMAGE_NAME: 'backend'
|
IMAGE_NAME: 'backend'
|
||||||
IMAGE_TAG: '${{ github.sha }}' # Use commit SHA for unique tagging
|
IMAGE_TAG: 'latest'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_deploy:
|
build_and_deploy:
|
||||||
@ -25,13 +25,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
|
|
||||||
- name: Clear npm cache and install dependencies
|
- name: Install dependencies and build project
|
||||||
run: |
|
run: |
|
||||||
npm cache clean --force
|
|
||||||
npm install
|
npm install
|
||||||
|
npm run build
|
||||||
- name: Build project
|
|
||||||
run: npm run build
|
|
||||||
|
|
||||||
- name: Log in to Azure
|
- name: Log in to Azure
|
||||||
uses: azure/login@v1
|
uses: azure/login@v1
|
||||||
@ -55,7 +52,4 @@ jobs:
|
|||||||
--name ${{ env.AZURE_WEB_APP_NAME }} \
|
--name ${{ env.AZURE_WEB_APP_NAME }} \
|
||||||
--resource-group backend \
|
--resource-group backend \
|
||||||
--docker-custom-image-name ${{ env.ACR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} \
|
--docker-custom-image-name ${{ env.ACR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} \
|
||||||
--docker-registry-server-url https://${{ env.ACR_REGISTRY }}
|
--docker-registry-server-url https://${{ env.ACR_REGISTRY }}
|
||||||
|
|
||||||
- name: Restart Web App
|
|
||||||
run: az webapp restart --name ${{ env.AZURE_WEB_APP_NAME }} --resource-group backend
|
|
||||||
Reference in New Issue
Block a user