-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (32 loc) · 1.02 KB
/
node.js.yml
File metadata and controls
38 lines (32 loc) · 1.02 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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: OptimumERP
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
build:
runs-on: self-hosted
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install and Test backend
working-directory: ./backend
run: |
npm install
- name: Create env file
run: |
echo "${{secrets.PROD_ENV_FILE}}" > .env
- name: Restart app
run: |
npm install pm2 -g
pm2 start ecosystem.config.js