File tree Expand file tree Collapse file tree 1 file changed +23
-20
lines changed Expand file tree Collapse file tree 1 file changed +23
-20
lines changed Original file line number Diff line number Diff line change 1
- name : Deploy Node.js Backend from /backend to Azure
1
+ name : Deploy Backend to Azure
2
2
3
3
on :
4
4
push :
5
5
branches :
6
- - main
6
+ - main # or your deployment branch
7
7
8
8
jobs :
9
9
build-and-deploy :
10
10
runs-on : ubuntu-latest
11
11
12
- defaults :
13
- run :
14
- working-directory : ./backend # <-- Important to tell it to work inside backend
15
-
16
12
steps :
17
- - name : Checkout Repository
18
- uses : actions/checkout@v4
13
+ - name : Checkout code
14
+ uses : actions/checkout@v4
15
+
16
+ - name : Azure Login
17
+ uses : azure/login@v1
18
+ with :
19
+ creds : ${{ secrets.AZURE_CREDENTIALS }}
19
20
20
- - name : Setup Node.js
21
- uses : actions/setup-node@v4
22
- with :
23
- node-version : ' 20 ' # or your Node version
21
+ - name : Set up Node.js
22
+ uses : actions/setup-node@v3
23
+ with :
24
+ node-version : 18 # or your Node version
24
25
25
- - name : Install Dependencies
26
- run : npm install
26
+ - name : Install dependencies
27
+ run : |
28
+ cd backend
29
+ npm install
27
30
28
- - name : Deploy to Azure Web App
29
- uses : azure/webapps-deploy@v3
30
- with :
31
- app-name : ${{ secrets.AZURE_WEBAPP_NAME }}
32
- publish-profile : ${{ secrets.AZURE_PUBLISH_PROFILE }}
33
- package : ./backend # <-- Deploy only the backend folder
31
+ - name : Deploy to Azure Web App
32
+ uses : azure/webapps-deploy@v3
33
+ with :
34
+ app-name : backendcodecrib
35
+ slot-name : production
36
+ package : ./backend
You can’t perform that action at this time.
0 commit comments