Compare commits

...

21 Commits

Author SHA1 Message Date
wfz
8252c06be2 fix: deploy to production with --branch main 2026-05-07 14:45:55 +08:00
wfz
36ba1ff0ae ci: auto deploy test 1778135139 2026-05-07 14:25:39 +08:00
wfz
4750040a7c fix: remove wrangler.toml before deploy 2026-05-07 11:43:55 +08:00
wfz
dbde6c91cb simplified: use npx wrangler 2026-05-07 11:41:49 +08:00
wfz
f22215d205 fix: create wrangler.toml dynamically 2026-05-07 11:38:53 +08:00
wfz
ded440f6bc fix: use wrangler@3.114.0 local install 2026-05-07 11:35:42 +08:00
wfz
67bd9af7c7 fix: remove wrangler.toml before deploy 2026-05-07 11:33:03 +08:00
wfz
20d5dd1544 fix: install wrangler@3 locally 2026-05-07 11:30:47 +08:00
wfz
0824714ef2 fix: rename wrangler.toml before deploy 2026-05-07 11:27:29 +08:00
wfz
6277161497 fix: add commit-dirty flag 2026-05-07 11:25:47 +08:00
wfz
294d9c8e11 fix: remove --yes flag 2026-05-07 11:24:00 +08:00
wfz
bcc59e2ee2 fix: use npx wrangler 2026-05-07 11:22:23 +08:00
wfz
fb1e072000 fix: install wrangler in pipeline 2026-05-07 11:20:58 +08:00
wfz
d8d205e203 fix: use full path for wrangler 2026-05-07 11:19:34 +08:00
wfz
b6c9ec5a43 fix: use wrangler for deployment 2026-05-07 11:18:11 +08:00
wfz
7cc95e35f2 ci: add automation test section 1778123497 2026-05-07 11:11:37 +08:00
wfz
a6a937a8cc ci: add CI/CD tip to 杂谈 1778121957 2026-05-07 10:45:57 +08:00
wfz
c49c37e06c ci: final flow test 2026-05-07 10:45:04 2026-05-07 10:45:04 +08:00
wfz
bd0ee20774 ci: webhook test 1778121645 2026-05-07 10:40:45 +08:00
wfz
6f997b20b9 ci: webhook test 1778120724 2026-05-07 10:25:24 +08:00
wfz
e2ae216139 ci: trigger build test 1778120024 2026-05-07 10:13:44 +08:00
7 changed files with 21 additions and 9 deletions

1
.wranglerrc Normal file
View File

@@ -0,0 +1 @@
CLOUDFLARE_API_TOKEN=i-cLQYN7eOHRl1HqncWUzA3OkR0p20JxB6ohKfE5

12
Jenkinsfile vendored
View File

@@ -3,27 +3,21 @@ pipeline {
environment {
CLOUDFLARE_API_TOKEN = 'cfut_cYi1Do6CdWPGD8ecrJ6ZtnOMcjU2GI6LdEToDEct71ff4034'
CF_ACCOUNT_ID = '0a0b9995a00648aadf505e235e66458a'
}
stages {
stage('Install') {
steps {
echo 'Installing dependencies...'
sh 'npm ci'
}
}
stage('Build') {
steps {
echo 'Building VitePress site...'
sh 'npm run build'
sh 'npm ci && npm run build'
}
}
stage('Deploy') {
steps {
echo 'Deploying to Cloudflare Pages...'
sh '''cd docs/.vitepress/dist && tar -czf /tmp/dist.tar.gz * && cd /tmp && curl -s -X POST "https://api.cloudflare.com/client/v4/accounts/0a0b9995a00648aadf505e235e66458a/pages/projects/web-home/deployments" -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" -F "file=@dist.tar.gz" -F "manifest={\\"version\\":1,\\"files\\":{\\"\\":\\"build\\"}}" -F "metadata={\\"branch\\":\\"main\\",\\"commit_hash\\":\\"$GIT_COMMIT\\",\\"skip_caching\\":true}"'''
sh 'rm -f wrangler.toml && npx wrangler pages deploy docs/.vitepress/dist --project-name=web-home --branch main'
}
}
}

View File

@@ -1 +1,5 @@
# Trigger Build 2026年 05月 07日 星期四 10:11:23 CST
## CI/CD 测试 $(date)
最终流程验证测试。

BIN
dist.tar.gz Normal file

Binary file not shown.

View File

@@ -15,11 +15,18 @@
1. **分解问题** - 把复杂问题拆成小问题
2. **抽象思维** - 找到事物的共同特征
3. **持续学习** - 技术更新很快,保持好奇心
4. **CI/CD 自动化** - 让机器做重复的事,节省时间
## 一些想法
生活就像写代码,有时候需要重构,有时候需要添加新功能,但最重要的是保持清晰的结构。
## 自动化部署测试
通过 Jenkins + Gitea Webhook + Cloudflare Pages 实现全自动部署流程!
测试时间:$(date)
---
*持续更新中...*

2
test.txt Normal file
View File

@@ -0,0 +1,2 @@
webhook test 2026年 05月 07日 星期四 10:25:24 CST
ci test 1778121645

4
wrangler.toml Normal file
View File

@@ -0,0 +1,4 @@
name = "web-home"
account_id = "0a0b9995a00648aadf505e235e66458a"
compatibility_date = "2024-01-01"
pages_build_output_dir = "docs/.vitepress/dist"