Skip to content

CI workflow

CI workflow #19

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
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: Delete config files from build
run: rm -rf dist/config
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_KEY }}
- name: Deploy
run: |
rsync -e "ssh -o StrictHostKeyChecking=no" -avz ./dist/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.SSH_PATH }}
- name: Trigger PM2 restart
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd ${{ secrets.SSH_PATH }} && pm2 restart gathio"