
将博客从 GitHub Pages 迁移到 Azure Static Web Apps
背景 我的博客 atbug.com 一直采用 Hugo 作为静态网站生成器,内容和源码托管在 GitHub 仓库,通过 GitHub Actions 自动构建并发布到 addozhang.github.io 仓库,最终使用 GitHub Pages 进行托管。这种方式简单高效,适合个人博客的持续集成与部署。 迁移原因 作为微软 Azure MVP,我可以使用 Azure 的相关服务。Azure Static Web Apps 提供了更高的可用性、全球 CDN、自动化部署、集成认证等优势,因此决定将博客从 GitHub Pages 迁移到 Azure Static Web Apps。 迁移过程 准备工作 保持博客源码和内容依然托管在 GitHub 仓库,无需更改原有内容结构。 确保本地 Hugo 版本与生产环境一致,建议使用官方推荐的 Hugo Extended 版本。 创建 Azure Static Web App





