Skip to content

feat: add github workflow #4

feat: add github workflow

feat: add github workflow #4

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: Deploy to SSH Instance
run: |
scp -i ${{ secrets.DEPLOY_KEY }} -r dist/* ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ env.TARGET_DIR }}
env:
TARGET_DIR: '/var/www/html'