This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |