forked from hngprojects/hng_boilerplate_expressjs
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (31 loc) · 779 Bytes
/
dev.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
name: Build, Test, and Deploy for Dev Branch
on:
push:
branches:
- dev
jobs:
build:
runs-on: self-hosted
defaults:
run:
working-directory: /var/www/aihomework/dev
steps:
- name: Pull from github
id: pull
run: |
git stash
git pull origin dev
- name: install dependencies
run: yarn install
- name: Run Test
run: yarn test
- name: buld the dist
run: yarn build
- name: migrate
run: yarn reset-db
- name: setup service file
run: sudo cp server-script/aihomeworkdev.service /etc/systemd/system
- name: start the app
run: |
sudo systemctl daemon-reload
sudo systemctl restart aihomeworkdev