Skip to content

Workflow file for this run

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 }}