惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - Franky
D
Docker
Jina AI
Jina AI
The GitHub Blog
The GitHub Blog
博客园 - 聂微东
B
Blog RSS Feed
大猫的无限游戏
大猫的无限游戏
M
MIT News - Artificial intelligence
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
博客园 - 叶小钗
爱范儿
爱范儿
D
DataBreaches.Net
Hugging Face - Blog
Hugging Face - Blog
IT之家
IT之家
Recent Announcements
Recent Announcements
U
Unit 42
腾讯CDC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
宝玉的分享
宝玉的分享
量子位
Stack Overflow Blog
Stack Overflow Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Azure Blog
Microsoft Azure Blog

开飞机的老张

AGENTS.md Openspec 使用心得 从树莓派内网穿透到 Cloudflare Pages 郊眠寺 采石 译:我为什么使用Map(和WeakMap)处理DOM节点 介绍JavaScript中Symbol 原生JavaScript获取URL参数 字符串首字母大写 用forEach()遍历对象 JavaScript禁用按钮 JavaScript的FormData JavaScript的Blob 用FileReader读取本地文件 JavaScript的Thenable JavaScript中Promise的reject JavaScript的立即调用函数表达式(IIFE) JavaScript的Promise链 用interact.js实现拖拽、缩放、吸附 使用bluebird操作Promise JavaScript创建Promise JavaScript中Promise的catch函数 JavaScript比较数组
Openclaw和博客
kaifeiji.cc · 2026-03-03 · via 开飞机的老张

最近在树莓派上折腾 OpenClaw 助手,顺便把博客也迁移过来了,记录一下完整过程。

整体架构

graph TD
  A["GitHub Pages deploy 分支"]
  B["GitHub Pages master 分支"]
  C["树莓派 (nginx)"]
  D["kaifeiji.cc"]

  A -->|Github Actions push deploy| B
  B -->|git pull| C
  C -->|Cloudflare Tunnel| D

博客托管

博客源码在 GitHub 仓库,通过 GitHub Actions 自动构建并部署到 GitHub Pages。

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
name: Deploy Hexo Blog

on:
push:
branches:
- deploy

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'npm'

- name: Install Dependencies
run: npm ci

- name: Build Hexo
run: npx hexo generate

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_branch: ${{ github.event.repository.default_branch }}
force_orphan: true

树莓派同步

在树莓派上 clone 博客仓库:

1
git clone https://github.com/kaifeiji/kaifeiji.github.io.git

更新时让 Openclaw 手动 pull一次:

1
2
git fetch origin
git reset --hard origin/master

用 nginx 做静态文件服务:

1
2
3
4
5
6
7
8
9
server {
listen 80;
server_name _;
root /root/kaifeiji.github.io;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}

外网暴露

用 Cloudflare Tunnel 将内网服务暴露到公网域名,具体流程自己搜吧,这里不赘述了。