generated from agiledev-students-fall2023/generic-project-repository
-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (44 loc) · 1.11 KB
/
node.js.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Node.js CI
on:
push:
branches: [ 'master', 'workflows-action' ]
pull_request:
branches: [ 'master', 'workflows-action' ]
jobs:
build-and-start:
runs-on: self-hosted
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install back-end dependencies
run: |
hostname
pwd
cd back-end
npm install
- name: Start back-end
run: |
cd back-end
npm start &
sleep 10 # Waits 10 seconds to ensure back-end is up
- name: Install front-end dependencies
run: |
cd front-end
npm install
- name: Start front-end
run: |
cd front-end
npm start &
sleep 10 # Waits 10 seconds to ensure front-end is up
# console.log
# pwd: which place
# run these steps on where
# how to automatically copy code to the server -->