Skip to content

Add PM2 deployment config #26

Add PM2 deployment config

Add PM2 deployment config #26

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
continue-on-error: true
- name: Set up config files
run: cp config/config.example.toml config/config.toml
- name: Build
run: pnpm build
continue-on-error: true
- name: Test
run: |
pnpm start &
sleep 5
curl -sSf http://localhost:3000
- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_KEY }}
- name: Install PM2
run: pnpm install -g pm2
- name: Deploy
run: pnpm run deploy