-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (31 loc) · 916 Bytes
/
main.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
name: CI/CD Pipeline
on:
push:
branches:
- main
jobs:
deploy:
runs-on: self-hosted
steps:
- name: Pull latest changes
working-directory: /home/training-runner/training-tracker-cse/
run: |
git pull
- name: Install backend dependencies
working-directory: /home/training-runner/training-tracker-cse/backend/
run: |
npm install
- name: Start backend server
run: |
sudo systemctl restart training-tracker
- name: Install client dependencies
working-directory: /home/training-runner/training-tracker-cse/client
run: |
npm install
- name: Build client
working-directory: /home/training-runner/training-tracker-cse/client
run: |
npm run build
- name: Serve client
run: |
sudo systemctl restart training-tracker-client