Skip to content

feat: add github workflow #8

feat: add github workflow

feat: add github workflow #8

Workflow file for this run

name: Deploy to SSH Instance
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install Vite dependencies
run: npm install
- name: Build React app
run: npm run build
- name: Copy dist to VPS
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
port: 22
key: ${{ secrets.DEPLOY_KEY }}
source: 'dist'
target: '/var/www/html'