Early Automation for Static Sites on GitHub Actions

Shohei Ueda (@peaceiris), a computer science student in Japan, first got into software through blogging. After discovering static site generators—particularly Hugo—and realizing GitHub Pages was perfect for publishing his blog, he became a regular GitHub user. When GitHub Actions entered beta, Ueda was among the first to try it, and he saw an immediate opportunity to automate the Hugo build-and-deploy loop he was running by hand.

Building the Missing Piece

At the time, the Actions ecosystem had no public action for Ueda's workflow. To automate publishing a Hugo site to GitHub Pages, he needed to set up the toolchain, build the site, commit the output, and push it to the Pages branch. So he created two actions: the Hugo setup action and a GitHub Pages deploy action. Both started as Docker actions, since that was the only option in the Actions beta v1 runtime.

A deliberate choice shaped the project: keeping setup and deployment in separate actions means the Pages deployer can be paired with any other static site generator, not just Hugo. Today, the Hugo setup action has been rewritten in TypeScript, and the Pages action is slated for the same migration.

Why TypeScript Won Over Docker

The original Hugo action hit a practical wall: Hugo ships new versions frequently, and every one of them required a fresh release of the Docker-based action. Moving to JavaScript—and then TypeScript—eliminated that overhead.

Docker actions need a build step before they run and tie you into the Node.js ecosystem, while JavaScript or TypeScript actions execute immediately. Ueda notes that even without prior Node experience, writing the TypeScript action was straightforward. TypeScript's strict typing helped enforce implementation quality, and the actions/toolkit made it easy to support Ubuntu, macOS, and Windows runners. His advice to other Action authors: build with TypeScript.

Sharing and Matrices as Standout Features

Ueda highlights two GitHub Actions capabilities as particularly valuable. Action sharing simplifies YAML workflows and makes it easier to follow best practices by reusing vetted pieces rather than copy-pasting logic. Matrix builds, meanwhile, are his go-to for testing public Actions across multiple operating systems.

What's Next

The immediate roadmap is finishing the TypeScript rewrite of the GitHub Pages deploy action. After that, the priority is expanding test coverage across his remaining Actions to raise overall quality.

Lessons for the Community

Ueda's closing message is aimed at would-be Action authors: publish whatever you build, no matter how small. A script that seems trivial to its creator can solve a real problem for someone else, and that exchange is the core of open source. His own work is available through the GitHub Marketplace, where he joins hundreds of other Action maintainers. For those getting started, GitHub offers a Learning Lab course on building Actions. The GitHub Hackathon, open through March 31, is another route to experimenting with Actions and earning exclusive swag.