Compare commits
21 Commits
6fb73f4638
...
8252c06be2
| Author | SHA1 | Date | |
|---|---|---|---|
| 8252c06be2 | |||
| 36ba1ff0ae | |||
| 4750040a7c | |||
| dbde6c91cb | |||
| f22215d205 | |||
| ded440f6bc | |||
| 67bd9af7c7 | |||
| 20d5dd1544 | |||
| 0824714ef2 | |||
| 6277161497 | |||
| 294d9c8e11 | |||
| bcc59e2ee2 | |||
| fb1e072000 | |||
| d8d205e203 | |||
| b6c9ec5a43 | |||
| 7cc95e35f2 | |||
| a6a937a8cc | |||
| c49c37e06c | |||
| bd0ee20774 | |||
| 6f997b20b9 | |||
| e2ae216139 |
1
.wranglerrc
Normal file
1
.wranglerrc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CLOUDFLARE_API_TOKEN=i-cLQYN7eOHRl1HqncWUzA3OkR0p20JxB6ohKfE5
|
||||||
12
Jenkinsfile
vendored
12
Jenkinsfile
vendored
@@ -3,27 +3,21 @@ pipeline {
|
|||||||
|
|
||||||
environment {
|
environment {
|
||||||
CLOUDFLARE_API_TOKEN = 'cfut_cYi1Do6CdWPGD8ecrJ6ZtnOMcjU2GI6LdEToDEct71ff4034'
|
CLOUDFLARE_API_TOKEN = 'cfut_cYi1Do6CdWPGD8ecrJ6ZtnOMcjU2GI6LdEToDEct71ff4034'
|
||||||
|
CF_ACCOUNT_ID = '0a0b9995a00648aadf505e235e66458a'
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Install') {
|
|
||||||
steps {
|
|
||||||
echo 'Installing dependencies...'
|
|
||||||
sh 'npm ci'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Building VitePress site...'
|
echo 'Building VitePress site...'
|
||||||
sh 'npm run build'
|
sh 'npm ci && npm run build'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Deploy') {
|
stage('Deploy') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Deploying to Cloudflare Pages...'
|
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'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1,5 @@
|
|||||||
# Trigger Build 2026年 05月 07日 星期四 10:11:23 CST
|
# Trigger Build 2026年 05月 07日 星期四 10:11:23 CST
|
||||||
|
|
||||||
|
## CI/CD 测试 $(date)
|
||||||
|
|
||||||
|
最终流程验证测试。
|
||||||
|
|||||||
BIN
dist.tar.gz
Normal file
BIN
dist.tar.gz
Normal file
Binary file not shown.
@@ -15,11 +15,18 @@
|
|||||||
1. **分解问题** - 把复杂问题拆成小问题
|
1. **分解问题** - 把复杂问题拆成小问题
|
||||||
2. **抽象思维** - 找到事物的共同特征
|
2. **抽象思维** - 找到事物的共同特征
|
||||||
3. **持续学习** - 技术更新很快,保持好奇心
|
3. **持续学习** - 技术更新很快,保持好奇心
|
||||||
|
4. **CI/CD 自动化** - 让机器做重复的事,节省时间
|
||||||
|
|
||||||
## 一些想法
|
## 一些想法
|
||||||
|
|
||||||
生活就像写代码,有时候需要重构,有时候需要添加新功能,但最重要的是保持清晰的结构。
|
生活就像写代码,有时候需要重构,有时候需要添加新功能,但最重要的是保持清晰的结构。
|
||||||
|
|
||||||
|
## 自动化部署测试
|
||||||
|
|
||||||
|
通过 Jenkins + Gitea Webhook + Cloudflare Pages 实现全自动部署流程!
|
||||||
|
|
||||||
|
测试时间:$(date)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
*持续更新中...*
|
*持续更新中...*
|
||||||
|
|||||||
2
test.txt
Normal file
2
test.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
webhook test 2026年 05月 07日 星期四 10:25:24 CST
|
||||||
|
ci test 1778121645
|
||||||
4
wrangler.toml
Normal file
4
wrangler.toml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
name = "web-home"
|
||||||
|
account_id = "0a0b9995a00648aadf505e235e66458a"
|
||||||
|
compatibility_date = "2024-01-01"
|
||||||
|
pages_build_output_dir = "docs/.vitepress/dist"
|
||||||
Reference in New Issue
Block a user