diff --git a/.github/workflows/npm-publish-github-packages.yml b/.github/workflows/npm-publish-github-packages.yml new file mode 100644 index 0000000..566131b --- /dev/null +++ b/.github/workflows/npm-publish-github-packages.yml @@ -0,0 +1,23 @@ +name: Node.js CI/CD + +on: + push: + branches: [ "main" ] + +jobs: + build: + runs-on: self-hosted + strategy: + matrix: + node-version: [18.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + 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 test + - run: pm2 restart backendserver