How to deploy only a subset of pages and keep others from previous deployment?

Hi there,

I’d like to use Hugo’s new feature --renderSegments to build and deploy only a subset of pages (pages that editors update more frequently, like blog posts).

My site also contains 200k+ products, categories, etc. These change only twice a year.

The build step can probably be cached.
The deploy step takes 4-6 minutes each time because the automatic calculation always compares checksums of all files, rather than skipping files not included in the --renderSegments build.

Any help is greatly appreciated.

Joachim

Hi, @jobee. There is no skipping the “calculate all checksums” step. The deploy API requires all file checksums for all deploys. There is no workaround for this.

I have a post that covers this in a different topic below:

If you wanted to build locally you could do something like this:

  1. build locally
  2. keep a local database of all SHA1 checksum
  3. update the local database when files change
  4. when deploying, call our API from you own custom code that calculates the checksum for new/changed files and rely on the database checksum for all unchanged files

Outside of a custom local workflow, I know of no other way around calculating all the checksum for all deploys. If there are other questions about this, please let us know.