-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (36 loc) · 1.19 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 # package.json 파일이 있는 디렉토리로 설정
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: "jinseung-db.mysql.database.azure.com"
DB_PORT: "3306"
DB_USERNAME: "adminuser@jinseung-db"
DB_PASSWORD: "cloud24admin!!"
DB_DATABASE: "cdc"
JWT_SECRET: "Secret"
JWT_ACCESS_TOKEN_EXPIRATION: "2h"
JWT_REFRESH_TOKEN_EXPIRATION: "10d"