Skip to content

api change

api change #3

Workflow file for this run

name: Node.js CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: self-hosted
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm' # This line enables automatic caching for npm dependencies
- name: Cache Node.js modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
# - run: npm i
- name: Set environment variables
run: |
touch .env
echo "${{ secrets.PROD_SECRET }}" > .env
- name: Install PM2
run: npm install -g pm2
- name: Start application with PM2
run: pm2 restart dist/index.js --interpreter node