-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (36 loc) · 1.17 KB
/
cicd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Deploy to Azure App Service
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v3
- name: Setup Node.js version
uses: actions/setup-node@v4
with:
node-version: "18.x"
- name: Install Dependencies
working-directory: ./backend
run: npm install
- name: Build the application
working-directory: ./backend
run: npm run build
- name: Deploy to Azure App Service
uses: azure/webapps-deploy@v2
with:
app-name: cdc
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: ./backend
env:
DB_HOST: ${{ secrets.DB_HOST }}
DB_PORT: ${{ secrets.DB_PORT }}
DB_USERNAME: ${{ secrets.DB_USERNAME }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_DATABASE: ${{ secrets.DB_DATABASE }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
JWT_ACCESS_TOKEN_EXPIRATION: ${{ secrets.JWT_ACCESS_TOKEN_EXPIRATION }}
JWT_REFRESH_TOKEN_EXPIRATION: ${{ secrets.JWT_REFRESH_TOKEN_EXPIRATION }}