Skip to content

Commit

Permalink
Create npm-publish.yml for subdir node server
Browse files Browse the repository at this point in the history
  • Loading branch information
realpxd authored Jan 20, 2024
1 parent 7ad1ddc commit 1e8890b
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/x-clone-backend/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages

name: Node.js XCLONE

on:
push:
branches: [ "main" ]

jobs:
build:
runs-on: self-hosted
strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v3

- name: Navigate to server directory
run: ls && pwd
- run: ls && pwd
- 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 test
- run: pm2 restart backendserver
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 comments on commit 1e8890b

Please sign in to comment.