forked from kitlang/kitlang.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.05 KB
/
Copy pathpage.yml
File metadata and controls
50 lines (42 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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
with:
version: 10
- 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