-
Notifications
You must be signed in to change notification settings - Fork 10
47 lines (40 loc) · 1.13 KB
/
serve.yml
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
name: Serve-next
on:
push:
branches: [next]
paths:
- "src/**"
- "templates/**"
- "tasks/**"
- ".github/**"
schedule:
- cron: "0 20 * * *"
jobs:
serve:
runs-on: windows-2019
steps:
# 获取仓库源码
- uses: actions/checkout@v4
with:
submodules: recursive
ref: ${{ github.ref }}
# 获取rclone
- uses: actions/checkout@v4
with:
repository: Cnotech/rclone
token: ${{ secrets.RCLONE_TOKEN }}
path: rclone
# 取出rclone
- name: Copy rclone
run: mv .\rclone\* .\ && New-Item -Path "~/.config/cloud189" -ItemType Directory && mv .\config.json ~/.config/cloud189/config.json
# 缓存 node_modules
- uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
# 安装依赖
- name: Install dependencies
run: npm install -g pnpm@9 && pnpm install
# 运行构建任务
- name: Run scripts
run: pnpm serve -g -e "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}"