<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Workflow | TZstats Convergence Lab | Tian Zheng, Columbia Stats</title><link>https://tz33cu.github.io/tags/workflow/</link><atom:link href="https://tz33cu.github.io/tags/workflow/index.xml" rel="self" type="application/rss+xml"/><description>Workflow</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Mon, 01 Jun 2026 00:00:00 +0000</lastBuildDate><image><url>https://tz33cu.github.io/media/icon_hu_244c03810a53b12e.png</url><title>Workflow</title><link>https://tz33cu.github.io/tags/workflow/</link></image><item><title>Keeping Two Sites in Sync: My Hugo + VS Code + Copilot Workflow</title><link>https://tz33cu.github.io/post/2026-06-01-website-workflows/</link><pubDate>Mon, 01 Jun 2026 00:00:00 +0000</pubDate><guid>https://tz33cu.github.io/post/2026-06-01-website-workflows/</guid><description>&lt;p>&lt;strong>Story: How I Got Here&lt;/strong>&lt;/p>
&lt;p>This setup lets me iterate quickly on a GitHub mirror while publishing the official version on my university domain.&lt;/p>
&lt;p>In summer 2025, after nearly ten years of intensive administrative work, I finally returned to updating my website. I hit a wall quickly: the Hugo template I had used years ago was no longer compatible with current versions, and the ecosystem had changed significantly.&lt;/p>
&lt;p>I had two choices: (1) keep patching and debugging the old setup (which I tried for hours), or (2) rebuild cleanly. Starting over is usually not my style, but this time it was the right call.&lt;/p>
&lt;p>I started with &lt;a href="https://hugoblox.com/" target="_blank" rel="noopener">Hugoblox&lt;/a>, which gave me a working site and GitHub deployment pipeline right away. Since I already maintain a university-hosted site, I kept that as the official destination instead of moving entirely to GitHub Pages.&lt;/p>
&lt;p>I cloned the source repo with GitHub Desktop and updated my Hugo settings for two contexts:&lt;/p>
&lt;ul>
&lt;li>default GitHub-friendly settings (for the mirror site), and&lt;/li>
&lt;li>local deployment settings (for my university server workflow).&lt;/li>
&lt;/ul>
&lt;p>In this repo, those settings live in Hugo YAML config files (for example, &lt;code>config/_default/hugo.yaml&lt;/code> and &lt;code>config/local/hugo.yaml&lt;/code>), not in a single &lt;code>config.yaml&lt;/code> file.&lt;/p>
&lt;p>I now manage this workflow in VS Code, with GitHub Copilot helping me check config details, draft content updates, and keep the dual-site setup consistent.&lt;/p>
&lt;p>&lt;strong>Dual-Site Setup&lt;/strong>&lt;/p>
&lt;p>I now maintain two related outputs:&lt;/p>
&lt;ul>
&lt;li>A GitHub mirror site for easy preview and sharing.&lt;/li>
&lt;li>My official university-hosted site for the final public version.&lt;/li>
&lt;/ul>
&lt;p>This gives me fast iteration plus institutional hosting when I am ready to publish.&lt;/p>
&lt;p>&lt;strong>Folder &amp;amp; Project Structure&lt;/strong>&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">WebsiteProjectFolder/ (main local project folder)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">|- public/ (local Hugo build output)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">|- GitHubRepo/ -&amp;gt; [Alias/Symlink] -------+
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">GitHubLocalRepos/
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">|- HugoSourceRepo/ (actual Git clone)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> |- config/
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> | |- _default/hugo.yaml (default/GitHub-oriented settings)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> | |- local/hugo.yaml (local university deployment settings)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> |- content/ (Markdown content)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> |- layouts/ (site templates)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> |- static/ (static assets)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> |- ...
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;ul>
&lt;li>The alias/symlink inside &lt;code>WebsiteProjectFolder/&lt;/code> points to the real Git clone.&lt;/li>
&lt;li>&lt;code>public/&lt;/code> stays outside the source repo, so build output is cleanly separated from version-controlled source files.&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Current Development Workflow&lt;/strong>&lt;/p>
&lt;p>I used to manually comment/uncomment &lt;code>publishDir&lt;/code> to avoid breaking GitHub builds. A cleaner approach is to keep local overrides in &lt;code>config/local/hugo.yaml&lt;/code> and apply them only for local builds.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="cl">[Edit in VS Code]
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> |
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> v
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">hugo server (local preview)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> |
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> v
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">Commit + push (GitHub Desktop)
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> |
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> v
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">GitHub mirror updates
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> |
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> v
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">When ready: sync local public/ -&amp;gt; university public_html/
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>This avoids repeatedly editing tracked defaults.&lt;/p>
&lt;p>Example commands:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Local preview with local overrides&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">hugo server --config config/_default/hugo.yaml,config/local/hugo.yaml
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Default build (GitHub-oriented defaults only)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">hugo
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>&lt;strong>VPN + Cyberduck Deployment Workflow&lt;/strong>&lt;/p>
&lt;ol>
&lt;li>Connect to university VPN.&lt;/li>
&lt;li>Open Cyberduck and mount the university server.&lt;/li>
&lt;li>Sync local &lt;code>public/&lt;/code> to server &lt;code>public_html/&lt;/code>.&lt;/li>
&lt;li>Review changes before sync for extra safety.&lt;/li>
&lt;/ol>
&lt;p>&lt;strong>Copilot in This Workflow&lt;/strong>&lt;/p>
&lt;p>VS Code + Copilot has been genuinely useful for maintaining this setup. In practice, it helps me:&lt;/p>
&lt;ul>
&lt;li>check Hugo config consistency across files,&lt;/li>
&lt;li>polish post drafts and fix markdown formatting,&lt;/li>
&lt;li>troubleshoot command-line and deployment steps,&lt;/li>
&lt;li>keep documentation aligned with what I actually run.&lt;/li>
&lt;/ul>
&lt;p>It does not replace understanding the system, but it significantly reduces friction.&lt;/p>
&lt;p>&lt;strong>Why This Setup Works for Me&lt;/strong>&lt;/p>
&lt;p>Many colleagues use GitHub Pages or WordPress very effectively. Those are great options. For my needs, this Hugo + GitHub mirror + university deployment model offers the right balance:&lt;/p>
&lt;ul>
&lt;li>reproducible source-managed content,&lt;/li>
&lt;li>a fast, shareable mirror for feedback,&lt;/li>
&lt;li>and an official university-hosted site for final publication.&lt;/li>
&lt;/ul>
&lt;p>At this stage, the system feels stable and sustainable, and day-to-day maintenance is much smoother.&lt;/p></description></item></channel></rss>