Skip to content

chore: run actions when .github/workflows changes, and set up pnpm #5

chore: run actions when .github/workflows changes, and set up pnpm

chore: run actions when .github/workflows changes, and set up pnpm #5

Workflow file for this run

name: Build and Deploy Page to VPS
on:
push:
branches:
- main
paths:
- ".github/workflows/**"
- ".gitignore"
- "src/**"
- "package*.json"
jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v6
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 'latest'
cache: 'pnpm'
- name: Install Node.js Dependencies
run: pnpm install
- name: Build Astro website
run: pnpm run build
# Deploy to VPS over SSH
- name: Deploy Book to VPS
uses: appleboy/scp-action@v1
with:
host: ${{ secrets.VPS_IP }}
username: actions
key: ${{ secrets.VPS_PRIV_KEY }}
port: 22
source: "dist"
target: "/home/actions/kitlang.dev"
strip_components: 1
rm: true