Compare commits

...

21 Commits

Author SHA1 Message Date
wfz
6fb73f4638 fix: deploy to production with --branch main 2026-05-07 14:45:55 +08:00
wfz
9461b3dad0 ci: auto deploy test 1778135139 2026-05-07 14:25:39 +08:00
wfz
1b820caf93 fix: remove wrangler.toml before deploy 2026-05-07 11:43:55 +08:00
wfz
be074b7726 simplified: use npx wrangler 2026-05-07 11:41:49 +08:00
wfz
14f2181e91 fix: create wrangler.toml dynamically 2026-05-07 11:38:53 +08:00
wfz
01d77185c9 fix: use wrangler@3.114.0 local install 2026-05-07 11:35:42 +08:00
wfz
93bb659589 fix: remove wrangler.toml before deploy 2026-05-07 11:33:03 +08:00
wfz
c2f00028cf fix: install wrangler@3 locally 2026-05-07 11:30:47 +08:00
wfz
f26182da69 fix: rename wrangler.toml before deploy 2026-05-07 11:27:29 +08:00
wfz
4108e2824c fix: add commit-dirty flag 2026-05-07 11:25:47 +08:00
wfz
8ad6bb4171 fix: remove --yes flag 2026-05-07 11:24:00 +08:00
wfz
02687701ee fix: use npx wrangler 2026-05-07 11:22:23 +08:00
wfz
78d758a210 fix: install wrangler in pipeline 2026-05-07 11:20:58 +08:00
wfz
c8a71cb031 fix: use full path for wrangler 2026-05-07 11:19:34 +08:00
wfz
92fee90006 fix: use wrangler for deployment 2026-05-07 11:18:11 +08:00
wfz
58360b7b03 ci: add automation test section 1778123497 2026-05-07 11:11:37 +08:00
wfz
090e87df3b ci: add CI/CD tip to 杂谈 1778121957 2026-05-07 10:45:57 +08:00
wfz
a4da3f61a3 ci: final flow test 2026-05-07 10:45:04 2026-05-07 10:45:04 +08:00
wfz
1a2c1b68ec ci: webhook test 1778121645 2026-05-07 10:40:45 +08:00
wfz
d9d985a9de ci: webhook test 1778120724 2026-05-07 10:25:24 +08:00
wfz
8ea64e912e ci: trigger build test 1778120024 2026-05-07 10:13:44 +08:00
6 changed files with 20 additions and 9 deletions

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"