Skip to content

Commit 77a589b

Browse files
committed
Add Azure deployment workflow for backend subfolder
1 parent 4621725 commit 77a589b

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Build and deploy Node.js app to Azure Web App - calendar-integration-backend
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read #This is required for actions/checkout
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Node.js version
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: '22.x'
22+
23+
- name: npm install, build, and generate
24+
run: |
25+
cd backend
26+
npm install
27+
npm run build
28+
npm run generate
29+
30+
- name: Upload artifact for deployment job
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: node-app
34+
path: backend
35+
36+
deploy:
37+
runs-on: ubuntu-latest
38+
needs: build
39+
permissions:
40+
id-token: write #This is required for requesting the JWT
41+
contents: read #This is required for actions/checkout
42+
43+
steps:
44+
- name: Download artifact from build job
45+
uses: actions/download-artifact@v4
46+
with:
47+
name: node-app
48+
49+
- name: Login to Azure
50+
uses: azure/login@v2
51+
with:
52+
client-id: ${{ secrets.__clientidsecretname__ }}
53+
tenant-id: ${{ secrets.__tenantidsecretname__ }}
54+
subscription-id: ${{ secrets.__subscriptionidsecretname__ }}
55+
56+
- name: 'Deploy to Azure Web App'
57+
id: deploy-to-webapp
58+
uses: azure/webapps-deploy@v3
59+
with:
60+
app-name: 'calendar-integration-backend'
61+
slot-name: 'Production'
62+
package: .

0 commit comments

Comments
 (0)