Skip to content

testing

testing #8

Workflow file for this run

name: CI
on:
push:
branches:
- main
- ci
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: npm install
- name: Run linting and typechecking
run: npm run check
- name: Run tests
run: npm test
- name: Build project
run: npm run build
- name: Upload dist to remote server
uses: appleboy/scp-action@v0.1.2
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
password: ${{ secrets.REMOTE_PASSWORD }}
target: ./dist
source: ./dist/*
rm: true
strip_components: 1
- name: Execute remote commands
uses: appleboy/ssh-action@v0.1.2
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
password: ${{ secrets.REMOTE_PASSWORD }}
script: |
pm2 restart artifacts