forked from agentscope-ai/QwenPaw
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (55 loc) · 1.76 KB
/
deploy-website.yml
File metadata and controls
66 lines (55 loc) · 1.76 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Deploy website to GitHub Pages (see scripts/website_build.sh).
# Custom domain: copaw.agentscope.io (CNAME).
name: Deploy website to GitHub Pages
on:
push:
branches: [main]
paths:
- "website/**"
- "scripts/install.sh"
- "scripts/install.ps1"
- ".github/workflows/deploy-website.yml"
workflow_dispatch:
permissions:
contents: write
concurrency:
group: deploy-website
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
cache-dependency-path: website/pnpm-lock.yaml
- name: Install dependencies
working-directory: website
run: pnpm install --frozen-lockfile
- name: Build
working-directory: website
env:
VITE_BASE_PATH: "/"
run: pnpm run build
# Copy installation scripts so they are served from the website
# (e.g. copaw.agentscope.io/install.sh) instead of raw.githubusercontent.com,
# which may be blocked by some firewalls.
- name: Copy installation scripts to dist
run: cp scripts/install.sh scripts/install.ps1 website/dist/
# 404.html fallback for unknown paths (real routes from build script).
- name: 404 fallback for GitHub Pages
run: cp website/dist/index.html website/dist/404.html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: website/dist
cname: copaw.agentscope.io