Back in 2018, I had written about my Blog Setup.
That process worked well so far.
Though it was not ideal, as the deployment process required quite a bit of manual work.
Thus, I always knew at the back of my head to revisit the setup and make it a bit more efficient.

I have something simpler now using automation via GitHub Actions.


Setup Link to heading

  1. Push the Hugo framework specific content to the master branch on the kshitij10496.github.io repository.
  2. Creating a GitHub Actions workflow1 for CI/CD of any changes to the master branch.
    • Make sure to specify the correct “branches” in the workflow.
    • You will have to add themes as Git Submodules to the repo.
  3. Configuring the Repository Settings to use the use the newly created GitHub Action instead of the default Jekyll-based Action provided by GitHub.2

Voila!

Result Link to heading

As soon as I write a piece of content - save, commit and push - on the master branch, it is automically published to my blog.

Conclusion Link to heading

It took me some time to figure out the details due to lack of consolidated documentation about working with this tech stack. This setup can be easily tuned to create a project specific Pages as well.
Hopefully, this post helps if you are considering to use Hugo with GitHub Pages to publish your static sites.