-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (43 loc) · 1.34 KB
/
backend_dev_azure.yaml
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
43
44
45
46
47
name: (TEST) build and deploy - integrator-backend
on:
push:
branches:
- dev
workflow_dispatch:
env:
AZURE_WEBAPP_NAME: integrator-backend
AZURE_WEBAPP_PACKAGE_PATH: "./backend"
NODE_VERSION: "18.x"
jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@main
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: ${{env.NODE_VERSION}}
- name: Cache node modules
id: cached-nodemodules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ./backend/node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: install packages, build (if necessary), test (if exists)
run: npm ci
working-directory: ${{env.AZURE_WEBAPP_PACKAGE_PATH}}
- name: Deploy to Azure
uses: azure/webapps-deploy@v2
with:
app-name: ${{env.AZURE_WEBAPP_NAME}}
publish-profile: ${{secrets.AZURE_WEBAPP_PUBLISH_PROFILE}}
package: ${{env.AZURE_WEBAPP_PACKAGE_PATH}}