目标
为了更好保存和记录博客,使用github+Tencent cos+Tencent CDN 存储blog,利用github action自动部署
依赖
- hexo
- github
- Tencent cos + Tencent CDN + github action
步骤
hexo+blog内容
部署
缓存
CDN
内容缓存到CDN,刷新策略:每次更新先刷新缓存再预热,使新内容下发到cdn节点,优化加载速度
由于只是个人blog,数据量很小,这里使用全量刷新,一个大站全量刷新会导致大量回源(是不合适的,源站可能撑不住)
CDN文档
参考
- https://github.com/lxl80/hexo-deployer-cos-cdn
- Tecent TCCLI 文档和example https://github.com/TencentCloud/tencentcloud-cli
- Tecent CDN API https://cloud.tencent.com/document/product/228/30974
- markdown语法 https://markdown.com.cn/basic-syntax/images.html
- https://segmentfault.com/a/1190000039707833
- https://cloud.tencent.com/developer/article/1632870
- https://www.ioiox.com/archives/69.html
- https://dr34m.gitee.io/2021/07/newpost-20/
- https://github.com/Techeek/hexo-deploy-tencentcloud-cdn
- 接入CDN后,网页访问速度慢 https://cloud.tencent.com/document/product/228/56144
- github action
- TencentCloud/cos-action@v1
- sma11black/hexo-action@v1.0.4
- actions/cache@v1