-
-
Notifications
You must be signed in to change notification settings - Fork 247
48 lines (40 loc) · 1.1 KB
/
deploy-docs.yml
File metadata and controls
48 lines (40 loc) · 1.1 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
name: Deploy Docs
on:
push:
branches:
- main
paths:
- 'docs/website/**'
workflow_dispatch:
jobs:
deploy:
name: Build & Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.16.0
cache: pnpm
cache-dependency-path: docs/website/pnpm-lock.yaml
- name: Install dependencies
run: pnpm --dir docs/website install
- name: Build docs
run: pnpm docs:build
env:
VITE_GA: ${{ secrets.VITE_GA }}
- name: Deploy to server
uses: burnett01/rsync-deployments@7.0.2
with:
switches: -rlptzv --delete
path: docs/website/.vitepress/dist/
remote_path: /var/www/masscode.io/public/
remote_host: ${{ secrets.DEPLOY_HOST }}
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_SSH_KEY }}