Skip to content

Conversation

@deepakjois
Copy link
Owner

Summary

This PR improves the CI/CD pipeline performance by enabling Go module caching and adding explicit build artifact caching for the site build process.

Key Changes

  • Enable Go build cache: Added cache: true to the actions/setup-go@v6 step to cache Go modules and build cache between workflow runs
  • Add build artifact caching: Introduced a new cache step using actions/cache@v4 to cache the build directory, with cache keys based on content, templates, and static file hashes
  • Optimize cache invalidation: Cache is invalidated only when relevant source files change (content/, templates/, static/**), reducing unnecessary rebuilds

Benefits

  • Faster CI/CD pipeline execution by reusing cached Go modules and build artifacts
  • Reduced bandwidth usage and build times on subsequent runs
  • Intelligent cache invalidation that only rebuilds when source files actually change

Enable setup-go module/build caching and cache the build/ directory
between workflow runs. Since the build overlays without wiping, cached
archive pages from previous runs persist without needing --rebuild.
@deepakjois deepakjois merged commit 823aaf1 into main Jan 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants