-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (54 loc) · 1.69 KB
/
node.js.yml
File metadata and controls
66 lines (54 loc) · 1.69 KB
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
60
61
62
63
64
65
66
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Art Quest CI
on:
push:
branches: [ production ]
jobs:
checkout-code:
name: Checkout Code
runs-on: self-hosted
steps:
- name: CHECK-OUT GIT REPOSITORY
uses: actions/checkout@v2
build-backend:
name: Build Backend
runs-on: self-hosted
needs: checkout-code
defaults:
run:
working-directory: ./backend
steps:
- name: CREATE PRODUCTION .ENV FILE
run: aq_env_backend
- name: INSTALL PROJECT DEPENDENCIES (YARN)
run: yarn install
- name: Enable Stapi EE
run: strapi_ee
- name: BUILD THE WEBPACK
run: yarn build --clean
build-frontend:
name: Build Frontend
runs-on: self-hosted
needs: build-backend
defaults:
run:
working-directory: ./frontend
steps:
- name: CREATE PRODUCTION .ENV FILE
run: aq_env_frontend
- name: INSTALL PROJECT DEPENDENCIES (YARN)
run: yarn install
- name: UPDATE THE BROWSERLIST
run: yarn add browserslist@latest --update-db
- name: BUILD THE WEBPACK
run: yarn build --clean
reload-process-manager:
name: Run Process Manager
runs-on: self-hosted
needs: [build-backend, build-frontend]
steps:
- name: Delete the Node Process Manager
run: pm2 delete art_quest_backend art_quest_frontend
- name: start the Node Process Manager
run: pm2 start ecosystem.config.js -i 0