Skip to content

Commit

Permalink
test multiple service deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
jibin362 committed Jun 11, 2024
1 parent 87008b5 commit 3eb9d77
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 46 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/app-service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy to Azure Web App

on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v3

- name: Setup Node Js
uses: actions/setup-node@v4
with:
node-version: "20.x"

- name: Install Dependencies
run: npm ci

- name: Merge shared libs with service package and create zip file
run: |
mkdir -p deployment_packages
cp -r libs/* deployment_packages/
cp -r app-service/* deployment_packages/
cd deployment_packages && zip -r ../app-service.zip . -x '*.git*' && cd ..
working-directory: ${{ github.workspace }}

- name: Deploy to Azure
uses: azure/webapps-deploy@v2
with:
app-name: app-poc-service
publish-profile: ${{ secrets.APP_PUBLISH_PROFILE }}
package: ${{ github.workspace }}/app-service.zip
46 changes: 0 additions & 46 deletions .github/workflows/cicd.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/test-service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy to Azure Web App

on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v3

- name: Setup Node Js
uses: actions/setup-node@v4
with:
node-version: "20.x"

- name: Install Dependencies
run: npm ci

- name: Merge shared libs with service package and create zip file
run: |
mkdir -p deployment_packages
cp -r libs/* deployment_packages/
cp -r test-service/* deployment_packages/
cd deployment_packages && zip -r ../test-service.zip . -x '*.git*' && cd ..
working-directory: ${{ github.workspace }}

- name: Deploy to Azure
uses: azure/webapps-deploy@v2
with:
app-name: test-poc-service
publish-profile: ${{ secrets.PUBLISH_PROFILE }}
package: ${{ github.workspace }}/test-service.zip

0 comments on commit 3eb9d77

Please sign in to comment.