The current repository at /Users/ssunxie/code/my-blog is a Jekyll blog based on the Minimal Mistakes theme. It was previously intended for deployment to a self-managed server behind Cloudflare using the custom domain blog.sunxie.me.
The desired destination is GitHub Pages using the existing repository https://github.com/xiesunsun/xiesunsun.github.io, with the blog published only at https://blog.sunxie.me.
Additional observed context:
origin still points to the upstream Minimal Mistakes starter repository, not the user’s repository.xiesunsun.github.io repository is not empty; it currently contains an Astro site deployed via GitHub Pages workflow.xiesunsun.github.io is currently configured with the custom domain sunxie.me, which does not match the intended final blog domain.blog.sunxie.me currently resolves to the previous Ubuntu/Nginx server rather than GitHub Pages.xiesunsun/xiesunsun.github.io with this Jekyll blog.https://blog.sunxie.me.sunxie.me beyond removing the incorrect Pages binding from this blog deployment.Use xiesunsun/xiesunsun.github.io as the canonical repository for the blog and directly replace its existing Astro site contents. Before replacement, preserve the previous contents in a backup branch so rollback remains possible.
This approach is preferred because:
Deploy the Jekyll site using GitHub Actions rather than relying on GitHub Pages’ built-in Jekyll builder.
This is preferred because:
Bind GitHub Pages only to blog.sunxie.me.
This is preferred because:
sunxie.me.After migration:
https://github.com/xiesunsun/xiesunsun.github.io contains the Jekyll blog source from this repository.CNAME file with blog.sunxie.me._config.yml keeps url: "https://blog.sunxie.me" and baseurl: "".blog.sunxie.me to xiesunsun.github.io via CNAME.https://blog.sunxie.me serves the GitHub Pages site over HTTPS.The migration implementation should make the minimum necessary source changes:
xiesunsun/xiesunsun.github.io._site artifact.CNAME file containing blog.sunxie.me._config.yml aligned with the final public URL.deploy.sh only if it is clearly marked obsolete; otherwise remove it to avoid ambiguity.Before replacing the contents of xiesunsun/xiesunsun.github.io:
main, such as backup/astro-before-jekyll-migration.main.In the repository settings or through the GitHub API:
sunxie.me to blog.sunxie.me.After the GitHub Pages custom domain is updated:
blog.sunxie.me from the old server IP to a CNAME pointing at xiesunsun.github.io.DNS only during the initial cutover.blog.sunxie.me, or users will continue reaching the old deployment.Use this order to minimize risk:
main branch.xiesunsun.github.io.blog.sunxie.me.blog.sunxie.me to CNAME xiesunsun.github.io.https://blog.sunxie.me.The migration is successful when all of the following are true:
bundle exec jekyll build succeeds.blog.sunxie.me as the active custom domain.https://blog.sunxie.me responds with the GitHub Pages-hosted blog, not the old Nginx server.If the migration fails before DNS cutover:
If the migration fails after DNS cutover:
blog.sunxie.me temporarily back to the previous server IP.blog.sunxie.me pointed at the old server during cutover, validation results will be misleading.sunxie.me must be removed to avoid domain ownership confusion.