Skip to content

Commit 40db977

Browse files
author
Ooalgown Ainz
committed
重构项目并更新readme
1 parent 875ce4e commit 40db977

12 files changed

Lines changed: 2611 additions & 490 deletions

File tree

.github/workflows/build-deploy.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- 'README.md'
9+
- '.gitignore'
10+
workflow_dispatch: # 允许手动触发
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
permissions:
17+
contents: write # 允许推送到仓库
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
with:
23+
token: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '20'
29+
cache: 'npm'
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Build _worker.js
35+
run: npm run build
36+
37+
- name: Commit and push _worker.js
38+
run: |
39+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
40+
git config --local user.name "github-actions[bot]"
41+
git add -f _worker.js
42+
git diff --staged --quiet || git commit -m "chore: auto-build _worker.js [skip ci]"
43+
git push

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ pnpm-debug.log*
77
# Cloudflare Wrangler
88
.wrangler/
99

10+
# Build output (generated by GitHub Actions)
11+
_worker.js
12+
1013
# OS
1114
.DS_Store
1215
Thumbs.db

0 commit comments

Comments
 (0)