<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>部署 on IMXBlog</title><link>https://blog.cxx.pub/tags/%E9%83%A8%E7%BD%B2/</link><description>Recent content in 部署 on IMXBlog</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Sat, 13 Jun 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.cxx.pub/tags/%E9%83%A8%E7%BD%B2/index.xml" rel="self" type="application/rss+xml"/><item><title>Hugo 博客部署到 GitHub Pages 完全指南</title><link>https://blog.cxx.pub/posts/github-pages-deployment-guide/</link><pubDate>Sat, 13 Jun 2026 00:00:00 +0000</pubDate><guid>https://blog.cxx.pub/posts/github-pages-deployment-guide/</guid><description>&lt;h2 id="前言"&gt;前言&lt;/h2&gt;
&lt;p&gt;本文详细介绍如何将 Hugo 静态博客部署到 GitHub Pages，使用 GitHub Actions 实现自动化部署，以及后续如何更新文章。无需手动构建，每次提交代码后自动部署。&lt;/p&gt;
&lt;h2 id="一准备工作"&gt;一、准备工作&lt;/h2&gt;
&lt;h3 id="11-本地环境"&gt;1.1 本地环境&lt;/h3&gt;
&lt;p&gt;确保已安装：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Git&lt;/li&gt;
&lt;li&gt;Hugo Extended 版本&lt;/li&gt;
&lt;li&gt;GitHub 账号&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="12-hugo-项目结构"&gt;1.2 Hugo 项目结构&lt;/h3&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;my-blog/
├── .github/
│ └── workflows/
│ └── hugo.yml # GitHub Actions 配置
├── archetypes/
├── content/
│ └── posts/ # 文章目录
├── themes/
│ └── imx-theme/ # 主题
├── static/
├── hugo.toml # Hugo 配置文件
└── .gitignore
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id="二创建-github-仓库"&gt;二、创建 GitHub 仓库&lt;/h2&gt;
&lt;h3 id="21-仓库命名规则"&gt;2.1 仓库命名规则&lt;/h3&gt;
&lt;p&gt;有两种选择：&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;选项 A：用户/组织主页（推荐）&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;仓库名：&lt;code&gt;username.github.io&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;访问地址：&lt;code&gt;https://username.github.io/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;示例：&lt;code&gt;c-x-x.github.io&lt;/code&gt; → &lt;code&gt;https://c-x-x.github.io/&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;选项 B：项目页面&lt;/strong&gt;&lt;/p&gt;</description></item></channel></rss>