Skip to content

Commit

Permalink
Update node.js.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Tsione Temesgen Abraham <tsionetemesgenabraham@gmail.com>
  • Loading branch information
TsioneTemesgenAbraham authored Feb 10, 2024
1 parent b65a72c commit 1f47ca3
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,30 @@ name: Node.js CI

on:
push:
branches: [ "main" ]
branches:
- main
pull_request:
branches:
- main

jobs:
build:

runs-on: self-hosted

strategy:
matrix:
node-version: [16.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install Dependencies
run: npm ci

- name: Build Application
run: npm run build --if-present

- name: Restart PM2 Process
run: sudo pm2 restart server

0 comments on commit 1f47ca3

Please sign in to comment.