Improving deployment pipeline speed

I noticed my Github deployment pipline takes about 40s. Could it be faster with a cache?

I have not had use for it myself but others suggest something like this:

- uses: actions/cache@v4
  with:
    path: resources
    key: ${{ runner.os }}-hugo-resources

If you are processing a lot of images etc. it should make a difference.

The cache can be max 10 GB and max one week old. Bigger/older and GitHub removes the cache.

I don’t have image resources.

I was thinking if I run hugo, could it be smart enough to generate just the file that had changed. Doesn’t appear to be the case!

The deploy command should only upload files that are changed.

You have so many pages that build time is an issue?

Well running hugo takes 20s according to this Action I think hayfever drugs · kaihendry/dabase.com@f71d32d · GitHub

image

Running hugo takes 0.577 seconds.

Running hugo deploy is the balance of the time.