<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>GitHub on Azure Readiness starts here...</title><link>https://www.pdtit.be/tags/github/</link><description>Recent content in GitHub on Azure Readiness starts here...</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Sat, 13 Jun 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.pdtit.be/tags/github/index.xml" rel="self" type="application/rss+xml"/><item><title>How I used GitHub Copilot to migrate my Hugo website to GitHub Pages</title><link>https://www.pdtit.be/post/how-i-used-github-copilot-to-migrate-my-hugo-website-to-github-pages/</link><pubDate>Sat, 13 Jun 2026 00:00:00 +0000</pubDate><guid>https://www.pdtit.be/post/how-i-used-github-copilot-to-migrate-my-hugo-website-to-github-pages/</guid><description>&lt;p&gt;If you&amp;rsquo;ve followed this blog for a while, you know it runs on &lt;strong&gt;&lt;a class="link" href="https://www.gohugo.io" target="_blank" rel="noopener"
 &gt;Hugo&lt;/a&gt;&lt;/strong&gt;, a fantastic static site generator that turns a folder of Markdown files into a fast, fully static website. For the past couple of years that site has been hosted on &lt;strong&gt;Azure Static Web Apps&lt;/strong&gt;, with an &lt;strong&gt;Azure DevOps pipeline&lt;/strong&gt; doing the heavy lifting of compiling Hugo and publishing the output.&lt;/p&gt;
&lt;p&gt;That setup served me well. After migration my old site templates and structure to a new one last February (see:https://www.pdtit.be/post/how-i-used-github-copilot-to-modernize-my-8-year-old-hugo-website/), I now wanted to consolidate everything into a single ecosystem and move the site to &lt;strong&gt;GitHub Pages&lt;/strong&gt;, built and deployed by &lt;strong&gt;GitHub Actions&lt;/strong&gt;. And because I wanted to see how far the tooling has come, I did the entire migration side-by-side with &lt;strong&gt;GitHub Copilot in agent mode&lt;/strong&gt; inside VS Code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Apart from moving the site, I also made the decision to decommission the 007FFFLearning.com brand, and go back to the &amp;ldquo;good-old&amp;rdquo; pdtit.be&amp;quot; one I had since the early days of the internet in 1996 already.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This post walks through &lt;em&gt;why&lt;/em&gt; I made the move, &lt;em&gt;what&lt;/em&gt; my old setup looked like, the &lt;em&gt;plan&lt;/em&gt; I followed, and &lt;em&gt;how&lt;/em&gt; the migration actually went, including the DNS part that always makes people nervous. I&amp;rsquo;m deliberately keeping it conceptual rather than copy-paste exact, so you can map it to your own site.&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s the prompt I used:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;/plan a migration from this repo from azure static webapps with Hugo to a GitHub Pages environment. The goal is to migrate away from Azure hosting, Azure DevOps pipeline for the blog post updates and run everything in GitHub. The new domain name should be www.pdtit.be instead of www.007FFFLearning.com, as a redirection from pdtit.github.io default Pages name. Prepare a migration plan, identify the successes, potential risks and evaluation criteria to move the site.
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;If a migration is technically possible without losing functionality, highlight the actual steps to migrate, knowing we want a smooth migration with minimal downtime
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;img src="../images/placeholder-copilot-agent-mode.png"
 
 
 loading="lazy"
 
 alt="GitHub Copilot agent mode in VS Code"
 
 
 
 &gt;&lt;/p&gt;
&lt;p&gt;// change draft: true to false&lt;/p&gt;
&lt;h2 id="1-why-github-pages-for-a-static-site"&gt;1. Why GitHub Pages for a static site?
&lt;/h2&gt;&lt;p&gt;A Hugo blog is, by definition, just a pile of static HTML, CSS, JavaScript and images once it&amp;rsquo;s built. You don&amp;rsquo;t need servers, containers, or databases to host it, you only need somewhere that can serve files over HTTPS. That&amp;rsquo;s exactly what &lt;strong&gt;GitHub Pages&lt;/strong&gt; does, for free, directly from a repository.&lt;/p&gt;
&lt;p&gt;A few reasons it&amp;rsquo;s a great fit:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;One place for everything.&lt;/strong&gt; Your content, your build pipeline, and your hosting all live in the same GitHub repo. No jumping between portals.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Build on push.&lt;/strong&gt; With &lt;strong&gt;GitHub Actions&lt;/strong&gt;, every push to your main branch rebuilds the site and publishes it automatically. Write a post, commit, done.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Free TLS and custom domains.&lt;/strong&gt; GitHub Pages provisions a certificate for your own domain at no cost and can enforce HTTPS.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No build output in source control.&lt;/strong&gt; The generated site is produced fresh in CI on every push, so you never have to commit the compiled HTML again.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For a personal blog, this removes a surprising amount of moving parts.&lt;/p&gt;
&lt;h2 id="2-where-i-was-coming-from-the-old-setup"&gt;2. Where I was coming from (the old setup)
&lt;/h2&gt;&lt;p&gt;Before the migration, the moving pieces looked like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Hugo&lt;/strong&gt; as the site generator, with content written in Markdown.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Azure Static Web Apps&lt;/strong&gt; as the host, serving the compiled site and handling TLS for my custom domain.&lt;/li&gt;
&lt;li&gt;An &lt;strong&gt;Azure DevOps pipeline&lt;/strong&gt; that triggered on every commit, installed the right Hugo version, built the site, ran a couple of validation checks (more on that later), and deployed it.&lt;/li&gt;
&lt;li&gt;The compiled output and even a copy of the Hugo binary were &lt;strong&gt;committed into the repository&lt;/strong&gt;, a habit from earlier days that I wanted to leave behind.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Nothing here was &lt;em&gt;broken&lt;/em&gt;. But it meant my publishing flow spanned two platforms (Azure DevOps for builds, Azure for hosting), and the repo carried a lot of generated weight it didn&amp;rsquo;t need.&lt;/p&gt;
&lt;h2 id="3-the-migration-plan"&gt;3. The migration plan
&lt;/h2&gt;&lt;p&gt;Rather than diving straight into edits, I asked Copilot Plan mode to help me draft a phased plan first. Having a clear plan up front is what keeps a migration like this calm instead of chaotic. At a high level it broke down into:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Phase 1 - Prepare the repository.&lt;/strong&gt;
Stop committing build output. Add a &lt;code&gt;.gitignore&lt;/code&gt; for the generated site, the Hugo cache, and any local binaries. Pin the exact Hugo version so local builds and CI builds always match.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Phase 2 - Recreate the build in GitHub Actions.&lt;/strong&gt;
Replace the Azure DevOps pipeline with a GitHub Actions workflow that installs Hugo, builds the site, and deploys it to Pages. Importantly, I carried over the &lt;strong&gt;validation checks&lt;/strong&gt; my old pipeline did, things like confirming the search index was generated and that newly added posts actually appear in the output, so I didn&amp;rsquo;t lose that safety net.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Phase 3 - Publish to GitHub.&lt;/strong&gt;
Create the GitHub repository, point the local repo at it, rename the default branch to &lt;code&gt;main&lt;/code&gt;, and push. Then flip the repo&amp;rsquo;s Pages setting to build from &lt;strong&gt;GitHub Actions&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Phase 4 - Custom domain.&lt;/strong&gt;
Tell GitHub which domain to serve, update the site&amp;rsquo;s base URL, configure DNS, and enforce HTTPS once the certificate is issued.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Phase 5 - Redirect the old domain.&lt;/strong&gt;
Keep the previous domain alive for a while and forward it to the new one so existing links and search engine results don&amp;rsquo;t break.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Phase 6 - Decommission the old platform.&lt;/strong&gt;
Once the new site is confirmed healthy, retire the Azure DevOps pipeline and the Azure Static Web App.&lt;/p&gt;
&lt;p&gt;&lt;img src="../images/placeholder-migration-plan.png"
 
 
 loading="lazy"
 
 alt="The phased migration plan drafted with Copilot"
 
 
 
 &gt;&lt;/p&gt;
&lt;p&gt;Writing the plan down also surfaced the &lt;em&gt;risks&lt;/em&gt; early, the trickiest being deep links from the old domain and making sure the search feature kept working. Knowing those in advance meant I could check for them deliberately instead of discovering them after go-live.&lt;/p&gt;
&lt;h2 id="4-how-the-migration-actually-went"&gt;4. How the migration actually went
&lt;/h2&gt;&lt;p&gt;With the plan agreed, the execution was honestly the easy part, this is where working alongside Copilot in agent mode really paid off. Instead of me hand-editing dozens of files, I described the outcome I wanted and reviewed the changes it proposed.&lt;/p&gt;
&lt;p&gt;A few highlights of the actual approach:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cleaning up the repo.&lt;/strong&gt;
The first win was getting the compiled site and the committed Hugo binaries &lt;em&gt;out&lt;/em&gt; of version control. Going forward, the build output is regenerated by CI on every push, so the repository only contains what it should: content and configuration.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A single build-and-deploy workflow.&lt;/strong&gt;
The GitHub Actions workflow became the new &amp;ldquo;engine&amp;rdquo; of the site, the direct replacement for the old pipeline. On every push to &lt;code&gt;main&lt;/code&gt; it installs the pinned Hugo version, builds the site, runs the validation checks, and deploys the result to Pages. The very first run going green was the moment I knew the new platform was viable.&lt;/p&gt;
&lt;p&gt;&lt;img src="../images/placeholder-actions-run-green.png"
 
 
 loading="lazy"
 
 alt="The GitHub Actions build and deploy workflow running green"
 
 
 
 &gt;&lt;/p&gt;
&lt;p&gt;Check out the actual GitHub Actions YAML if you want:&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://github.com/pdtit/pdtit.github.io/actions/runs/27473418917/workflow" target="_blank" rel="noopener"
 &gt;https://github.com/pdtit/pdtit.github.io/actions/runs/27473418917/workflow&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fixing up internal links.&lt;/strong&gt;
Because the domain was changing, I had Copilot sweep the content for hard-coded absolute links pointing at the old address and make them relative instead. Relative links survive a domain change without any further edits, which is exactly what you want.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Validating before trusting.&lt;/strong&gt;
Before pushing anything live, I rebuilt the site locally from a clean slate and verified the important things: the homepage and posts pointed at the new address, the client-side search index was present and valid, and no stale references lingered in the output. Only then did I publish.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The DNS part (kept high-level on purpose).&lt;/strong&gt;
This is the step people worry about most, but the pattern is well-trodden:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;&lt;code&gt;www&lt;/code&gt; subdomain&lt;/strong&gt; gets a &lt;strong&gt;CNAME&lt;/strong&gt; pointing at the GitHub Pages host.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;root (apex) domain&lt;/strong&gt; gets a set of &lt;strong&gt;A records&lt;/strong&gt; (and IPv6 &lt;code&gt;AAAA&lt;/code&gt; records) pointing at GitHub&amp;rsquo;s Pages addresses. GitHub publishes the exact values, you just enter them at your registrar.&lt;/li&gt;
&lt;li&gt;GitHub then automatically redirects the apex to your &lt;code&gt;www&lt;/code&gt; canonical address.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src="../images/placeholder-dns-records.png"
 
 
 loading="lazy"
 
 alt="The DNS records configured at the registrar"
 
 
 
 &gt;&lt;/p&gt;
&lt;p&gt;One gotcha worth calling out: if your registrar had any leftover parking or forwarding records on the apex, remove them, otherwise the certificate can struggle to provision. Once DNS resolved cleanly, GitHub issued the TLS certificate within minutes, and I switched on &lt;strong&gt;Enforce HTTPS&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Don&amp;rsquo;t strand the old domain.&lt;/strong&gt;
Finally, the previous domain stays alive and forwards to the new one. The key detail is to use a &lt;strong&gt;path-preserving redirect&lt;/strong&gt;, so an old deep link to a specific article lands on that same article on the new domain, not just the homepage. That protects your existing readers and your search rankings while everything propagates.&lt;/p&gt;
&lt;h2 id="wrapping-up"&gt;Wrapping up
&lt;/h2&gt;&lt;p&gt;The migration itself, prepare, rebuild in Actions, publish, wire up the domain, redirect the old one, was conceptually simple, but having GitHub Copilot do the repetitive editing, validation, and verification turned what could have been a tense weekend into a calm afternoon. The site you&amp;rsquo;re reading this on right now is the result: a Hugo blog, built by GitHub Actions, served from GitHub Pages, on my own domain.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re sitting on a static site hosted somewhere heavier than it needs to be, this is a very approachable move, and a great little project to try out agent-mode tooling on a real, low-risk task.&lt;/p&gt;
&lt;p&gt;// should always be the last section of the blog&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="https://www.buymeacoffee.com/pdtit" target="_blank" rel="noopener"
 &gt;&lt;img src="../images/buy_me_a_coffee.png"
 
 
 loading="lazy"
 
 alt="BuyMeACoffee"
 
 
 
 &gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Cheers!!&lt;/p&gt;
&lt;p&gt;/Peter&lt;/p&gt;</description></item></channel></rss>