Skip to content

rafactor: remove github pages actions #10

rafactor: remove github pages actions

rafactor: remove github pages actions #10

Workflow file for this run

name: Build & deploy in VPS
name: test build

Check failure on line 3 in .github/workflows/deploy-to-vps.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy-to-vps.yml

Invalid workflow file

You have an error in your yaml syntax on line 3
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Install dependencies
run: yarn install
- name: Build
run: yarn run build
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Deploy using SSH
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.PRIVATE_KEY }}
port: 22
script: |
cd ~/website
git pull origin main || { echo "Failed to pull latest changes from Git repository"; exit 1; }
yarn install || { echo "Failed to install dependencies"; exit 1; }
yarn run build || { echo "Build failed"; exit 1; }
pm2 restart kuosc || { echo "Failed to restart PM2"; exit 1; }