Deploy Hugo Theme exampleSite With Github Actions

Motivation

To test PRs on the upstream of a Hugo theme by setting up a testing branch.

Goal

To deploy a forked GitHub repo for a Hugo theme with exampleSite to GitHub Pages using GitHub Actions.

The whole article is based on my fork of Hugo Future Imperfect Slim.

References

  1. GitHub Actions for Hugo
  2. A Stack Overflow question showing pwd in GitHub Actions
  3. A Hugo Discourse post about testing exampleSite

Difficulties

I had failed for about ten times before I got the job done.

[Read More]

Set up GitHub Actions for Beautiful Jekyll

GitHub Actions provide CI/CD support, which might interest many GitHub users. I’ve applied for this feature a week ago. Luckily, my application for the trial was approved by GitHub. Tonight, I’ve found the motivation for making my first step in my forked repo VincentTam/beautiful-jekyll.

My setup:

  1. Clicked on the “Action” tab of the repo.
  2. Chose the workflow file template for Jekyll.
  3. Added a slash / in front of srv in chmod 777 srv/jekyll, so as to fix the “no such file or directory” error.
  4. Added the parameter repository: {your repo name} in the site config file _config.yml.

The action should be successfully configured.

[Read More]