<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>CI/CD on miti99</title><link>https://miti99.com/en/tags/ci/cd/</link><description>Recent content in CI/CD on miti99</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 16 Nov 2026 17:39:19 +0700</lastBuildDate><atom:link href="https://miti99.com/en/tags/ci/cd/index.xml" rel="self" type="application/rss+xml"/><item><title>Newsletter #31</title><link>https://miti99.com/en/post/2025/05/18/</link><pubDate>Sun, 18 May 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/05/18/</guid><description>&lt;p&gt;&lt;em&gt;Welcome to Newsletter #31.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="optimizing-our-e2e-pipeline"&gt;&lt;a href="https://slack.engineering/speedup-e2e-testing/" rel="noopener noreferrer"&gt;Optimizing Our E2E Pipeline&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Slack&amp;rsquo;s DevXP team shares how they optimized the end-to-end (E2E) test pipeline for the company&amp;rsquo;s largest monorepo. Previously, each run took about 10 minutes, with nearly half of that spent building the frontend—even when a change didn&amp;rsquo;t touch frontend code at all. With hundreds of pull requests merged daily, that produced thousands of builds per week, each taking nearly 1 GB on AWS S3 and adding up to terabytes of duplicate artifacts.&lt;/p&gt;
&lt;p&gt;Their solution used tools they already had: run &lt;code&gt;git diff&lt;/code&gt; with three-dot syntax to compare the current branch against its merge-base with &lt;code&gt;main&lt;/code&gt;; if no frontend files changed, skip the build step and reuse a recent production build served through an internal CDN. Even in a repository with over 100,000 files, detecting changes and locating a matching build takes under 3 seconds. As a result, total builds dropped by 60%, saving hundreds of compute hours per month and several terabytes of storage, while average build time fell from about 5 minutes to 2 minutes (and combined with an earlier Webpack upgrade, from 10 minutes down to 2 minutes overall). As an unexpected bonus, tests also became more stable and less flaky. The takeaway: regularly question which pipeline steps are actually necessary, even in systems that aren&amp;rsquo;t visibly broken.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="doordash"&gt;&lt;a href="https://careersatdoordash.com/blog/doordash-fast-travel-estimates/" rel="noopener noreferrer"&gt;DoorDash&amp;rsquo;s Fast Travel Estimates&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;DoorDash engineers explain how they estimate travel distance and duration in milliseconds—a core input for finding nearby stores, predicting delivery ETAs, calculating fees, and matching dashers. Calling a routing engine like OSRM directly typically takes over 100 ms, which is too slow for latency-sensitive paths like homepage refreshes or search ranking, while straight-line (haversine) distance is fast but inaccurate because it ignores real road networks.&lt;/p&gt;
&lt;p&gt;Their answer is Geo-Grid-Cache: partition the entire service area into hexagonal cells using the H3 spatial index, then precompute travel times between cell centers with OSRM under average traffic conditions. Each pair is stored across three resolution tiers—fine for trips under a mile, medium, and coarse for distances up to 100 miles—balancing cache hit rate, storage cost, and accuracy. At request time, the system looks up the pair in a Redis cluster and picks the highest resolution available. The hardest part was generating offline data for roughly 6 billion cell pairs; the team ran Spark on Databricks and installed OSRM directly on the cluster nodes to replace network calls with local HTTP calls, speeding up generation by 10x. The result is ultra-low latency, accuracy close to the internal routing engine, and major compute savings.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="tech-hiring-is-this-an-inflection-point"&gt;&lt;a href="https://blog.pragmaticengineer.com/tech-hiring-is-this-an-inflection-point/" rel="noopener noreferrer"&gt;Tech Hiring: Is This an Inflection Point?&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Gergely Orosz (The Pragmatic Engineer) highlights a paradox: even though fewer companies are hiring and more candidates are competing for roles, many engineering managers say 2025 is the hardest hiring market they have ever seen. A telling case is maestro.dev, a fully remote startup: every LinkedIn job posting draws hundreds of mostly unqualified applications, cover letters are almost universally AI-generated, and many candidates read answers straight from AI tools during live coding interviews. When the team switched to a take-home assignment, the head of engineering embedded a hidden prompt instruction aimed at AI assistants inside the spec—all four submissions followed the hidden instruction, even though three of the candidates insisted they hadn&amp;rsquo;t used AI. The most reliable signal came instead from candidates who reached out directly to explain why they wanted to join.&lt;/p&gt;
&lt;p&gt;Another remote company had to fire a senior data engineer after just two weeks upon discovering the person had fabricated their experience and used multiple AI tools simultaneously to pass the interview loop. That company is now considering adding a final in-person interview round despite the $1,500–$2,000 cost per candidate, while leaning harder on referrals since 4 of its last 5 hires came through internal recommendations. The post also covers LinkedIn Recruiter costs of $5,000–$20,000 per seat per month, the rise of paid &amp;ldquo;work trial&amp;rdquo; weeks, and the need to redesign remote hiring from the ground up in the AI era.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="underusing-snapshot-testing"&gt;&lt;a href="https://matklad.github.io/2025/04/15/underusing-snapshot-testing.html" rel="noopener noreferrer"&gt;Underusing Snapshot Testing&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Aleksey Kladov (matklad), creator of rust-analyzer, explains why he thinks he still underuses snapshot testing. The idea is straightforward: serialize a test&amp;rsquo;s output into text, compare it against an expected string literal embedded right in the source file, and use a tool to automatically update that literal from the actual output. The obvious benefit is easy maintenance when requirements change: the tool rewrites the expected output so the author can review the diff instead of editing strings by hand.&lt;/p&gt;
&lt;p&gt;What surprised him came from implementing permutation encoding in Zig—a problem whose requirements never change. With traditional assertion-based tests, execution stops at the first failure and the output is buried in a terminal window far from the code. Switching to inline snapshots surfaced every wrong result right inside the source file, letting him see the full picture at once and quickly spot two off-by-one bugs. In his view, snapshot tests keep data close to the programmer, tighten the feedback loop, and act like a repeatable REPL, speeding up development even when requirements are fixed. The end of the post also explains why a handful of concrete examples remain valuable alongside exhaustive testing over all permutations.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="principles-for-coding-securely-with-llms"&gt;&lt;a href="https://www.seangoedecke.com/ai-security/" rel="noopener noreferrer"&gt;Principles for coding securely with LLMs&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Sean Goedecke argues that LLM security shouldn&amp;rsquo;t be treated as a long checklist of disconnected threats, but derived from a single principle: LLMs sometimes act maliciously, so treat their output like untrusted user input. Prompt injection is fundamentally unavoidable—the moment you bring third-party content (web pages, docs, Cursor rules files) into the context window, you give its author a chance to steer the model, and no model is immune to jailbreaks.&lt;/p&gt;
&lt;p&gt;From that principle, every tool an LLM is allowed to call should be scoped and authorized like a public user-facing API: for example, expose &lt;code&gt;fetch_messages()&lt;/code&gt; rather than &lt;code&gt;fetch_messages(user_id)&lt;/code&gt; so the model cannot read another user&amp;rsquo;s messages, and require explicit human confirmation for high-impact actions like sending messages or transferring money. MCP servers are effectively remote libraries, meaning you are trusting the server&amp;rsquo;s owner, not just its interface. Even without an attacker, LLMs can hallucinate or take reckless actions, so human approval gates must be enforced in tool code rather than requested in the prompt. Goedecke also notes risks from fine-tuned or self-trained models (goal misalignment or leaking sensitive training data) and denial-of-service (DoS) attacks, since LLM calls are slow and GPU-heavy—cap concurrent sessions, token budgets, and tool access accordingly.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="how-i-don"&gt;&lt;a href="https://www.gleech.org/llms" rel="noopener noreferrer"&gt;How I don&amp;rsquo;t use LLMs&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Gavin Leech, an AI PhD, candidly explains why he rarely uses LLMs for intellectual work despite knowing firsthand how capable they are. Every time a new frontier model comes out, he tries it, and every time it confidently makes a serious error within the first few minutes. His reasons include loving writing enough that editing weak prose takes more effort than drafting from scratch, already having solid foundational knowledge across many fields, needing high accuracy and reliability when learning, disliking the model&amp;rsquo;s voice and habit of bluffing, worrying about skill atrophy, and not writing much code at the time.&lt;/p&gt;
&lt;p&gt;Even so, he still uses LLMs in specific situations: as a search replacement (only when citations are provided), for tip-of-the-tongue term recall, finding entry-point keywords in an unfamiliar field, semantic search over document collections, validating and converting JSON to CSV, getting past blank-page syndrome, and especially writing Matplotlib code or untangling Docker, WSL, and Cloudflare issues. To bypass model sycophancy, he frames his own ideas as if they came from someone else. The post strikes a balanced, self-critical tone: Leech admits part of the problem may be his own impatience, while warning that LLMs can quietly plant a few plausible falsehoods in your head every day.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="how-senior-software-engineers-can-learn-from-junior-engineers"&gt;&lt;a href="https://www.infoq.com/news/2025/04/software-engineers-learning/" rel="noopener noreferrer"&gt;How Senior Software Engineers Can Learn from Junior Engineers&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This InfoQ piece summarizes Beth Anderson&amp;rsquo;s QCon London talk on what senior engineers can learn from junior teammates. She notes that steep power distances on a team make junior engineers hesitant to speak up even when they spot a problem with serious consequences, stifling innovation and collaboration. Rather than treating mentorship as a one-way street, senior engineers should recognize that junior colleagues often bring high energy, fresh perspectives, and up-to-date skills.&lt;/p&gt;
&lt;p&gt;To build an inclusive culture, Anderson recommends active listening, amplifying others&amp;rsquo; voices, crediting contributions, and creating the psychological safety needed for juniors to ask questions freely. One concrete practice is &amp;ldquo;reverse feedback&amp;rdquo;: asking junior engineers to critique how seniors communicate with them, asking how they prefer to learn, and inviting them to review senior engineers&amp;rsquo; code and pull requests as a learning exercise. She also urges juniors not to repeat the dismissive behaviors that once frustrated them when they become seniors themselves, because seniority is not about authority—it is an opportunity to create positive change. Every engineer, at every level, has a perspective worth learning from if we are willing to listen.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="as-an-engineer-i"&gt;&lt;a href="https://shiftmag.dev/asking-questions-engineering-career-advice-4895/" rel="noopener noreferrer"&gt;As an engineer, I&amp;rsquo;d rather be called stupid than stay silent&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Marko Antanaskovic recounts overcoming imposter syndrome while working as a Customer Support Engineer at Infobip. Opening with a fictional incident call packed with impenetrable jargon, he captures a familiar feeling: not understanding what the developers are saying, yet staying quiet out of fear of looking stupid while the customer waits for an update. Realizing nobody could know everything across such a massive platform—and that no textbook covered it—he decided to tap the knowledge of his colleagues by asking &amp;ldquo;stupid&amp;rdquo; questions like &amp;ldquo;What does that actually mean?&amp;rdquo;&lt;/p&gt;
&lt;p&gt;Antanaskovic points out the real cost of silence: prolonged outages because nobody connects the technical symptom to customer impact, poor work caused by misunderstood requirements, and meetings that sink into awkward silence. To build a questioning culture, he suggests being the first to ask, shifting from blame to education in the spirit of a blameless culture, and trusting the people around you. That willingness to look &amp;ldquo;stupid&amp;rdquo; helped him build enough deep system knowledge to transition into a Reliability Operations Engineer role. His closing takeaway: no sincere question is stupid, and it is far better to risk looking foolish than to stay silent and make preventable mistakes.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Newsletter #19</title><link>https://miti99.com/en/post/2025/05/06/</link><pubDate>Tue, 06 May 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/05/06/</guid><description>&lt;p&gt;&lt;em&gt;Enjoy Newsletter #19.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="a-love-letter-to-the-csv-format"&gt;&lt;a href="https://github.com/medialab/xan/blob/master/docs/LOVE_LETTER.md" rel="noopener noreferrer"&gt;A love letter to the CSV format&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The author of &lt;code&gt;xan&lt;/code&gt; (a command-line CSV processing tool developed by medialab) wrote this &amp;ldquo;love letter&amp;rdquo; to push back against articles constantly declaring CSV obsolete in the face of Parquet, newline-delimited JSON, or MessagePack. CSV is no silver bullet, the author admits, but it has strengths that are routinely overlooked: a specification simple enough to explain in seconds (commas separate values, newlines separate rows, special values go in quotes), no corporate owner, and plain-text representation that humans can read and edit directly. CSV can also be streamed row by row with minimal memory and supports efficient append-only writes at the end of a file—things columnar formats like Parquet handle much worse, even if columnar formats excel when querying only a few columns.&lt;/p&gt;
&lt;p&gt;Beyond that, CSV is dynamically typed, leaving each language free to decide how to parse values (both flexible and error-prone if you&amp;rsquo;re careless), and remarkably compact since column names appear only once in the header rather than repeating keys on every record like JSON or XML. Even more uniquely, because escaping double quotes by doubling them is symmetrical, a CSV file reversed byte-for-byte is still valid CSV; this makes it possible to quickly read the last few rows of a massive file from the end, which is handy when resuming an interrupted job. The author jokes in closing that Excel hates CSV, which is probably a sign CSV is doing something right. For newer developers, the piece is a good reminder to pick data formats based on the actual problem rather than chasing trends.&lt;/p&gt;
&lt;h2 id="the-role-of-developer-skills-in-agentic-coding"&gt;&lt;a href="https://martinfowler.com/articles/exploring-gen-ai/13-role-of-developer-skills.html" rel="noopener noreferrer"&gt;The role of developer skills in agentic coding&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Birgitta Böckeler (Thoughtworks) reflects on months of using the agent modes of Cursor, Windsurf, and Cline to modify existing codebases. She appreciates how these tools can automatically run tests, fix compiler errors, and search the web, but notes that even in her most successful sessions, she constantly had to step in and steer. She categorizes AI mistakes into three &amp;ldquo;blast radii&amp;rdquo;: slowing down completion of a single commit (broken code or misdiagnosed problems, like blaming Docker&amp;rsquo;s architecture settings when the real issue was &lt;code&gt;node_modules&lt;/code&gt; built for the wrong architecture); creating friction for the team across development iterations (tackling too much at once instead of working in small vertical slices, treating symptoms by bumping memory limits instead of finding the root cause, or making the dev workflow messier); and most dangerously, degrading long-term maintainability (redundant tests, poor reuse, unnecessary verbosity). The wider the blast radius, the longer the feedback loop to catch the problem.&lt;/p&gt;
&lt;p&gt;In her view, we are nowhere near AI autonomously writing 90% of code within a year; right now, AI assists her roughly 80% of the time on a small ~15k-line project. To mitigate risks, individual developers should carefully review AI-generated code, stop sessions when cognitive load gets too high, stay wary of &amp;ldquo;good enough&amp;rdquo; solutions that appear too quickly, and practice pair programming. At the team level, she recommends maintaining code quality monitors like SonarQube or CodeScene, running checks in pre-commit hooks, curating custom rule files for AI assistants, and fostering a culture of trust and openness so nobody feels pressured to cut corners just to ship faster. For junior developers, the article clearly highlights the engineering skills that still matter in the AI era.&lt;/p&gt;
&lt;h2 id="cicd-devops-pipeline-project-deployment-of-java-application-on-kubernetes"&gt;&lt;a href="https://dev.to/prodevopsguytech/cicd-devops-pipeline-project-deployment-of-java-application-on-kubernetes-4fi2" rel="noopener noreferrer"&gt;CI/CD DevOps Pipeline Project: Deployment of Java Application on Kubernetes&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This DEV Community tutorial walks through building an end-to-end CI/CD pipeline from scratch to deploy a Java application onto Kubernetes, aiming to automate the entire software delivery lifecycle with minimal manual intervention. The infrastructure spans AWS EC2 instances for the Kubernetes master, worker nodes, Jenkins, SonarQube, Nexus, and a monitoring server. The author details setting up the cluster with Kubeadm (disabling swap, installing the CRI-O runtime and Kubernetes packages, initializing the control plane, and joining worker nodes), installing Jenkins, Docker, and Nexus, and setting up a private Git repository with a personal access token.&lt;/p&gt;
&lt;p&gt;At the heart of the guide is the &lt;code&gt;Jenkinsfile&lt;/code&gt;: the pipeline checks out the source code, compiles and runs tests with Maven, scans for vulnerabilities with Trivy, analyzes code quality via SonarQube, packages and uploads artifacts to Nexus, builds and pushes the Docker image, deploys to Kubernetes, and sends status notifications. The final section sets up real-time observability using Prometheus, Blackbox Exporter, and Grafana. It makes a solid hands-on project for developers who want to see how common DevOps tools fit together into a single cohesive workflow.&lt;/p&gt;
&lt;h2 id="road-to-jdk-25-over-engineering-tic-tac-toe-java-24"&gt;&lt;a href="https://briancorbinxyz.medium.com/road-to-jdk-25-over-engineering-tic-tac-toe-java-24-565c7f9b06d0" rel="noopener noreferrer"&gt;Road to JDK 25: Over-Engineering Tic-Tac-Toe (Java 24)&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;In his &amp;ldquo;Road to JDK 25&amp;rdquo; series, Brian Corbin explores new Java features by deliberately over-engineering a simple tic-tac-toe game. This installment covers JDK 24—which includes 24 JEPs—focusing on finalized, non-preview features. The standout addition is Stream Gatherers: using &lt;code&gt;Stream::gather(Gatherer)&lt;/code&gt;, developers can define custom stateful or stateless intermediate Stream operations with one-to-one, one-to-many, many-to-one, or many-to-many semantics, alongside built-in gatherers like &lt;code&gt;fold&lt;/code&gt;, &lt;code&gt;scan&lt;/code&gt;, &lt;code&gt;windowFixed&lt;/code&gt;, and &lt;code&gt;windowSliding&lt;/code&gt;. The ZGC garbage collector is now exclusively generational, collecting short-lived objects more frequently and efficiently.&lt;/p&gt;
&lt;p&gt;Other highlights include a standard Class-File API for reading, generating, and transforming &lt;code&gt;.class&lt;/code&gt; files (foundational for bytecode tooling), Ahead-of-Time Class Loading &amp;amp; Linking to cut startup times, and two quantum-resistant lattice-based cryptographic algorithms for key encapsulation and digital signatures. Each feature is demonstrated directly inside the tic-tac-toe codebase, and Corbin notes that JDK 25, the next LTS release, arrives in September 2025.&lt;/p&gt;
&lt;h2 id="oracle-reveals-five-new-features-coming-to-java"&gt;&lt;a href="https://www.infoworld.com/article/3848288/oracle-reveals-five-new-features-coming-to-java.html" rel="noopener noreferrer"&gt;Oracle reveals five new features coming to Java&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Right on the heels of JDK 24&amp;rsquo;s general availability, Oracle previewed five features in the pipeline for upcoming Java releases; all have JEPs, though none are finalized yet (for instance, JEP 402 is still a Draft and JEP 468 is a Candidate). Enhanced primitive boxing makes primitive types behave more like reference types, such as calling methods directly on primitive values or using primitives as type arguments. Value classes and objects introduce identity-free objects with only &lt;code&gt;final&lt;/code&gt; fields, distinguished purely by their field values so the JVM can optimize memory layout, locality, and garbage collection. Paired with this are null-restricted value class types, allowing variables of value types to forbid &lt;code&gt;null&lt;/code&gt; for denser storage.&lt;/p&gt;
&lt;p&gt;Derived record creation provides concise syntax for creating a new record from an existing one without writing boilerplate &amp;ldquo;wither&amp;rdquo; methods (the immutable equivalent of setters). Finally, Stable Values—confirmed as a preview feature in JDK 25 (September 2025)—are objects holding immutable data that the JVM treats as constants, delivering &lt;code&gt;final&lt;/code&gt;-like performance optimizations with more flexible initialization timing to improve application startup. Together, these proposals show Java steadily modernizing both its object model and its runtime performance.&lt;/p&gt;
&lt;h2 id="java-bytecode-hacking-for-fun-and-profit"&gt;&lt;a href="https://cory.li/bytecode-hacking/" rel="noopener noreferrer"&gt;Java bytecode hacking for fun and profit&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The author shares Java bytecode optimization techniques learned from Battlecode, a programming competition where AI bots control virtual robots and each turn is capped by a strict bytecode execution limit (roughly 6,000–10,000 bytecodes) rather than wall-clock CPU time. While manual bytecode golfing has been rare in everyday Java ever since JIT compilers matured, it can decide wins and losses in Battlecode. The post explains that the JVM is a stack-based virtual machine where each bytecode is an atomic instruction akin to assembly, and Battlecode counts instructions regardless of byte width—so &lt;code&gt;iload_0&lt;/code&gt; and &lt;code&gt;iload #5&lt;/code&gt; each cost one instruction.&lt;/p&gt;
&lt;p&gt;By inspecting decompiled bytecode, the author demonstrates several concrete tricks: rewriting enhanced &lt;code&gt;for-each&lt;/code&gt; loops manually to shave a few instructions per iteration, copying instance fields into local variables because every field access costs an extra instruction, comparing against zero wherever possible since the JVM has dedicated zero-comparison opcodes, and using labeled &lt;code&gt;break&lt;/code&gt;/&lt;code&gt;continue&lt;/code&gt; statements to force the compiler to emit direct &lt;code&gt;goto&lt;/code&gt; jumps that skip unnecessary loop tails. The author stresses that you should only optimize at this level after finalizing your core AI framework and algorithms, as correctness and algorithmic efficiency always come first. Even if you rarely need this at work, it&amp;rsquo;s a fun way to see how Java actually executes under the hood.&lt;/p&gt;
&lt;h2 id="how-to-write-blog-posts-that-developers-read"&gt;&lt;a href="https://refactoringenglish.com/chapters/write-blog-posts-developers-read/" rel="noopener noreferrer"&gt;How to Write Blog Posts that Developers Read&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Michael Lynch, who has written a software blog for nine years reaching 300,000–500,000 readers annually, shares principles for writing technical blog posts developers actually read; the piece is a sample chapter from his upcoming book on writing for software developers. His first rule is to get straight to the point: your title and opening sentences should immediately tell readers who the post is for and what they will get out of it. Next is &amp;ldquo;think one level broader&amp;rdquo;: adding just a couple of sentences explaining background concepts or swapping niche jargon for plain language can open the article to a vastly larger audience. He also emphasizes having a realistic distribution path—such as Hacker News, Reddit, or Google search—rather than simply writing something good and hoping people find it.&lt;/p&gt;
&lt;p&gt;The remaining two rules focus on presentation. Adding visuals is the single highest-leverage improvement: screenshots, charts, diagrams—even a clumsy MS Paint drawing is far more engaging than AI-generated art. Finally, cater to skimmers, since many readers scan headings and images before deciding whether to read word for word; Lynch even provides a bookmarklet that blurs body text so you can preview your post through a skimmer&amp;rsquo;s eyes. Every principle is backed by examples from his own blog and applies just as well to internal design docs and workplace emails.&lt;/p&gt;
&lt;h2 id="the-new-look-and-feel-of-apache-kafka-40"&gt;&lt;a href="https://thenewstack.io/the-new-look-and-feel-of-apache-kafka-4-0/" rel="noopener noreferrer"&gt;The New Look and Feel of Apache Kafka 4.0&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Apache Kafka 4.0 brings upgrades across nearly every component of the distributed event streaming platform, but the headline change is running exclusively in KRaft (Raft-based) mode and removing ZooKeeper mode entirely. As Sandon Jacobs (Confluent) explains, this transition was prepared across multiple releases; operations teams no longer need to provision and manage a separate ZooKeeper cluster, configure TLS between two systems, or allocate dedicated compute for it—one less component means one less point of failure. The release also includes early access to Queues for Kafka (KIP-932), allowing the number of consumers to exceed a topic&amp;rsquo;s partition count so it behaves like traditional message queues such as Amazon SQS; the trade-off is that message ordering is not guaranteed, so ordered workloads should stick with traditional consumer groups.&lt;/p&gt;
&lt;p&gt;In addition, KIP-848 introduces a new consumer group protocol that eliminates stop-the-world rebalances; in Kafka 4.0, clients opt in via &lt;code&gt;group.protocol=consumer&lt;/code&gt;. KIP-1112 lets developers declare a processor wrapper applied across every processor in a Kafka Streams topology instead of manually duplicating cross-cutting logic like audit logging everywhere. Finally, KIP-1076 and KIP-1091 expand client and broker metrics that can be pushed over OpenTelemetry to observability tools like Datadog. For developers working with streaming data, Kafka 4.0 makes operations substantially simpler.&lt;/p&gt;
&lt;h2 id="five-things-ai-will-not-change"&gt;&lt;a href="https://metastable.org/five/" rel="noopener noreferrer"&gt;Five Things AI Will Not Change&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Inspired by how Jeff Bezos built Amazon around things customers will always want (low prices, fast delivery, vast selection) rather than trying to predict the future of the internet, the author outlines five things that won&amp;rsquo;t change even with powerful AI. First, there will be many AIs rather than a single superintelligence, because fierce competition prevents any one lab from holding a monopoly for long. Second, rogue or malicious AIs will always exist, created intentionally or accidentally by humans, much like the social media manipulation campaigns seen in the 2016 US election. Third, abundance will not be distributed equally: AI cannot manufacture more land or scarce physical resources, so money will still be needed to allocate them. Fourth, politics will remain deeply divided, because many disagreements stem from conflicting values rather than a lack of information. Fifth, humans will not become &amp;ldquo;ants&amp;rdquo; to AI, because AI is trained on human culture and will converse directly with us on every subject.&lt;/p&gt;
&lt;p&gt;In the closing section, the author explains why the 2023 open letter calling for a pause on giant AI experiments was never going to succeed: humanity is still fighting cancer, Alzheimer&amp;rsquo;s, pandemics, and poverty, and AI holds real promise for helping solve them. In the author&amp;rsquo;s view, both the AI doomers and the utopians are wrong; the future will be messy and occasionally dark, but also beautiful and inspiring.&lt;/p&gt;
&lt;h2 id="bonus-interesting-images-from-bytebytego"&gt;Bonus: Interesting images from &lt;a href="https://bytebytego.com/" rel="noopener noreferrer"&gt;ByteByteGo&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;img src="https://substack-post-media.s3.amazonaws.com/public/images/5321bec2-0079-47e2-92e9-1cd9950227c8_2250x2624.png" alt="Object Oriented Programming Fundamentals"&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;This post was rewritten by Claude Code with Opus 5.5 on 27/09/2026; reviewed and edited by Codex with GPT 6.1 Sol on 09/11/2026, and re-verified by Claude Code with Sonnet 5.5 on 16/11/2026.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>Using GitHub Actions Cache to Reduce Build Time</title><link>https://miti99.com/en/post/2025/03/07/</link><pubDate>Fri, 07 Mar 2025 00:00:00 +0700</pubDate><guid>https://miti99.com/en/post/2025/03/07/</guid><description>&lt;p&gt;Recently, when publishing my Newsletter posts, I&amp;rsquo;ve been attaching a lot of images. When building the site with Hugo, Hugo has to process all of these images (generating multiple resized versions to optimize load times). As a result, my build time increased noticeably—sometimes taking up to 4 minutes. To solve this problem, I looked into and applied GitHub Actions Cache to cut down the build time.&lt;/p&gt;
&lt;h2 id="what-is-github-actions-cache"&gt;What Is GitHub Actions Cache?&lt;/h2&gt;&lt;p&gt;GitHub Actions Cache is a feature in GitHub Actions that lets you persist files or directories between workflow runs. This avoids re-downloading dependencies or regenerating unchanged files from scratch, significantly reducing workflow execution time.&lt;/p&gt;
&lt;p&gt;Common use cases for caching include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Project dependencies (&lt;code&gt;node_modules&lt;/code&gt;, &lt;code&gt;vendor&lt;/code&gt;, etc.)&lt;/li&gt;
&lt;li&gt;Build outputs (&lt;code&gt;resources&lt;/code&gt;, &lt;code&gt;artifacts&lt;/code&gt;, etc.)&lt;/li&gt;
&lt;li&gt;Databases or large data files&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="why-optimize-build-time"&gt;Why Optimize Build Time?&lt;/h2&gt;&lt;p&gt;In practice, when building a Hugo site, rebuilding the entire site from scratch on every small change can take a lot of time, as I mentioned at the beginning of this post. In most cases, only a small portion of the website changes, while assets like images and stylesheets have already been processed in previous builds.&lt;/p&gt;
&lt;p&gt;In Hugo, the &lt;code&gt;resources&lt;/code&gt; directory stores processed files such as resized images and CSS compiled from SCSS. Caching this directory avoids reprocessing files that haven&amp;rsquo;t changed.&lt;/p&gt;
&lt;h2 id="implementing-github-actions-cache-with-hugo"&gt;Implementing GitHub Actions Cache with Hugo&lt;/h2&gt;&lt;p&gt;Below is the GitHub Actions workflow I use to deploy my Hugo site to GitHub Pages, with caching enabled for the &lt;code&gt;resources&lt;/code&gt; directory:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;span class="lnt"&gt;21
&lt;/span&gt;&lt;span class="lnt"&gt;22
&lt;/span&gt;&lt;span class="lnt"&gt;23
&lt;/span&gt;&lt;span class="lnt"&gt;24
&lt;/span&gt;&lt;span class="lnt"&gt;25
&lt;/span&gt;&lt;span class="lnt"&gt;26
&lt;/span&gt;&lt;span class="lnt"&gt;27
&lt;/span&gt;&lt;span class="lnt"&gt;28
&lt;/span&gt;&lt;span class="lnt"&gt;29
&lt;/span&gt;&lt;span class="lnt"&gt;30
&lt;/span&gt;&lt;span class="lnt"&gt;31
&lt;/span&gt;&lt;span class="lnt"&gt;32
&lt;/span&gt;&lt;span class="lnt"&gt;33
&lt;/span&gt;&lt;span class="lnt"&gt;34
&lt;/span&gt;&lt;span class="lnt"&gt;35
&lt;/span&gt;&lt;span class="lnt"&gt;36
&lt;/span&gt;&lt;span class="lnt"&gt;37
&lt;/span&gt;&lt;span class="lnt"&gt;38
&lt;/span&gt;&lt;span class="lnt"&gt;39
&lt;/span&gt;&lt;span class="lnt"&gt;40
&lt;/span&gt;&lt;span class="lnt"&gt;41
&lt;/span&gt;&lt;span class="lnt"&gt;42
&lt;/span&gt;&lt;span class="lnt"&gt;43
&lt;/span&gt;&lt;span class="lnt"&gt;44
&lt;/span&gt;&lt;span class="lnt"&gt;45
&lt;/span&gt;&lt;span class="lnt"&gt;46
&lt;/span&gt;&lt;span class="lnt"&gt;47
&lt;/span&gt;&lt;span class="lnt"&gt;48
&lt;/span&gt;&lt;span class="lnt"&gt;49
&lt;/span&gt;&lt;span class="lnt"&gt;50
&lt;/span&gt;&lt;span class="lnt"&gt;51
&lt;/span&gt;&lt;span class="lnt"&gt;52
&lt;/span&gt;&lt;span class="lnt"&gt;53
&lt;/span&gt;&lt;span class="lnt"&gt;54
&lt;/span&gt;&lt;span class="lnt"&gt;55
&lt;/span&gt;&lt;span class="lnt"&gt;56
&lt;/span&gt;&lt;span class="lnt"&gt;57
&lt;/span&gt;&lt;span class="lnt"&gt;58
&lt;/span&gt;&lt;span class="lnt"&gt;59
&lt;/span&gt;&lt;span class="lnt"&gt;60
&lt;/span&gt;&lt;span class="lnt"&gt;61
&lt;/span&gt;&lt;span class="lnt"&gt;62
&lt;/span&gt;&lt;span class="lnt"&gt;63
&lt;/span&gt;&lt;span class="lnt"&gt;64
&lt;/span&gt;&lt;span class="lnt"&gt;65
&lt;/span&gt;&lt;span class="lnt"&gt;66
&lt;/span&gt;&lt;span class="lnt"&gt;67
&lt;/span&gt;&lt;span class="lnt"&gt;68
&lt;/span&gt;&lt;span class="lnt"&gt;69
&lt;/span&gt;&lt;span class="lnt"&gt;70
&lt;/span&gt;&lt;span class="lnt"&gt;71
&lt;/span&gt;&lt;span class="lnt"&gt;72
&lt;/span&gt;&lt;span class="lnt"&gt;73
&lt;/span&gt;&lt;span class="lnt"&gt;74
&lt;/span&gt;&lt;span class="lnt"&gt;75
&lt;/span&gt;&lt;span class="lnt"&gt;76
&lt;/span&gt;&lt;span class="lnt"&gt;77
&lt;/span&gt;&lt;span class="lnt"&gt;78
&lt;/span&gt;&lt;span class="lnt"&gt;79
&lt;/span&gt;&lt;span class="lnt"&gt;80
&lt;/span&gt;&lt;span class="lnt"&gt;81
&lt;/span&gt;&lt;span class="lnt"&gt;82
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Deploy site to GitHub Pages&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;push&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;branches&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;main&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;pull_request&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;branches&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="l"&gt;main&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;workflow_dispatch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;permissions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;read&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;pages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;write&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;id-token&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;write&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;concurrency&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;group&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;pages&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;cancel-in-progress&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;defaults&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;shell&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;bash&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nt"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;build&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;ubuntu-latest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;HUGO_VERSION&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;0.140.2&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Install Hugo CLI&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; &amp;amp;&amp;amp; sudo dpkg -i ${{ runner.temp }}/hugo.deb&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Checkout&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;actions/checkout@v4&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;submodules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;recursive&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;fetch-depth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Setup Pages&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;pages&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;actions/configure-pages@v5&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Restore resources&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;actions/cache/restore@v4&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; resources&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;${{ runner.os }}-resources-${{ github.run_id }}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restore-keys&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; ${{ runner.os }}-resources-&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Build with Hugo&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;HUGO_CACHEDIR&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;${{ runner.temp }}/hugo_cache&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;HUGO_ENVIRONMENT&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;production&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;TZ&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Asia/Ho_Chi_Minh&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; hugo \
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; --gc \
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; --minify \
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; --baseURL &amp;#34;${{ steps.pages.outputs.base_url }}/&amp;#34;&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Save resources&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;actions/cache/save@v4&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; resources&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;${{ runner.os }}-resources-${{ github.run_id }}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Upload artifact&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;actions/upload-pages-artifact@v3&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;./public&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;deploy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;github-pages&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;${{ steps.deployment.outputs.page_url }}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;ubuntu-latest&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;needs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;build&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Deploy to GitHub Pages&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;deployment&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;actions/deploy-pages@v4&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="cache-configuration-details"&gt;Cache Configuration Details&lt;/h3&gt;&lt;p&gt;In the workflow above, there are two steps related to caching:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Restore resources&lt;/strong&gt;: Restores the cache from previous workflow runs&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;span class="lnt"&gt;8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Restore resources&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;actions/cache/restore@v4&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; resources&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;${{ runner.os }}-resources-${{ github.run_id }}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restore-keys&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; ${{ runner.os }}-resources-&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;ol start="2"&gt;
&lt;li&gt;&lt;strong&gt;Save resources&lt;/strong&gt;: Saves the updated cache after the build completes&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Save resources&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;actions/cache/save@v4&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; resources&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;${{ runner.os }}-resources-${{ github.run_id }}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="how-the-cache-key-works"&gt;How the Cache Key Works&lt;/h3&gt;&lt;p&gt;Parameters used in the cache configuration:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;path&lt;/strong&gt;: Path to the directory or file to cache—here, Hugo&amp;rsquo;s &lt;code&gt;resources&lt;/code&gt; directory&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;key&lt;/strong&gt;: A unique key identifying the cache. A common format is &lt;code&gt;${{ runner.os }}-[cache-name]-[hash]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;restore-keys&lt;/strong&gt;: A list of key prefixes used to find a fallback cache if an exact key match isn&amp;rsquo;t found&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;${{ runner.os }}&lt;/code&gt; ensures the cache is only shared across runs on the same operating system&lt;/li&gt;
&lt;li&gt;&lt;code&gt;resources&lt;/code&gt; is the name of the cache&lt;/li&gt;
&lt;li&gt;&lt;code&gt;${{ github.run_id }}&lt;/code&gt; is the unique ID of each workflow run&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With this setup, when an exact match for &lt;code&gt;${{ runner.os }}-resources-${{ github.run_id }}&lt;/code&gt; isn&amp;rsquo;t found, GitHub Actions falls back to the most recent cache matching the prefix &lt;code&gt;${{ runner.os }}-resources-&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id="performance-comparison"&gt;Performance Comparison&lt;/h2&gt;&lt;p&gt;After enabling the cache, my build time dropped dramatically:&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Status&lt;/th&gt;
 &lt;th&gt;Average Build Time&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Without cache&lt;/td&gt;
 &lt;td&gt;~4 minutes 19 seconds&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;With cache&lt;/td&gt;
 &lt;td&gt;~25 seconds&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;For larger projects, the time saved can easily reach several minutes or even tens of minutes.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://miti99.com/post/2025/03/07/img/before.png" alt="Before caching"&gt;
&lt;img src="https://miti99.com/post/2025/03/07/img/after.png" alt="After caching"&gt;&lt;/p&gt;
&lt;h2 id="going-further-caching-other-dependencies"&gt;Going Further: Caching Other Dependencies&lt;/h2&gt;&lt;p&gt;Besides caching Hugo&amp;rsquo;s &lt;code&gt;resources&lt;/code&gt;, you can apply the same approach to other types of dependencies:&lt;/p&gt;
&lt;h3 id="nodejs-dependencies-node_modules"&gt;Node.js dependencies (node_modules)&lt;/h3&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;span class="lnt"&gt;8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Restore node_modules&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;actions/cache/restore@v4&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; node_modules&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;${{ runner.os }}-node-${{ hashFiles(&amp;#39;**/package-lock.json&amp;#39;) }}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restore-keys&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; ${{ runner.os }}-node-&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id="go-modules"&gt;Go modules&lt;/h3&gt;&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;span class="lnt"&gt;4
&lt;/span&gt;&lt;span class="lnt"&gt;5
&lt;/span&gt;&lt;span class="lnt"&gt;6
&lt;/span&gt;&lt;span class="lnt"&gt;7
&lt;/span&gt;&lt;span class="lnt"&gt;8
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;- &lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;Restore Go modules&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;actions/cache/restore@v4&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; ~/go/pkg/mod&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l"&gt;${{ runner.os }}-go-${{ hashFiles(&amp;#39;**/go.sum&amp;#39;) }}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;restore-keys&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="sd"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="sd"&gt; ${{ runner.os }}-go-&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id="cache-optimization-tips"&gt;Cache Optimization Tips&lt;/h2&gt;&lt;p&gt;To get the most out of caching, consider the following strategies:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Selective caching&lt;/strong&gt;: Only cache files that are genuinely needed, avoiding temporary files or logs&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hash dependency lockfiles&lt;/strong&gt;: Use hashes of lockfiles like &lt;code&gt;package-lock.json&lt;/code&gt; in your cache key so the cache updates automatically whenever dependencies change&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cache layering&lt;/strong&gt;: Use separate caches for different components of your application&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;&lt;p&gt;GitHub Actions Cache is a powerful tool for optimizing your CI/CD pipeline. With Hugo, caching the &lt;code&gt;resources&lt;/code&gt; directory drastically cuts down build times, especially when your site has lots of images or stylesheets to process.&lt;/p&gt;
&lt;p&gt;This is just a basic example of how to use GitHub Actions Cache. Depending on your specific project, you may want to adopt more advanced caching strategies.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;d like to learn more, check out the GitHub Actions Cache repository at &lt;a href="https://github.com/actions/cache" rel="noopener noreferrer"&gt;https://github.com/actions/cache&lt;/a&gt;, or read the official documentation at &lt;a href="https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows" rel="noopener noreferrer"&gt;https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I hope this post helps you optimize your project&amp;rsquo;s CI/CD pipeline. If you have any questions or feedback, feel free to leave a comment below.&lt;/p&gt;
&lt;p&gt;You can find the full workflow I&amp;rsquo;m currently using in &lt;a href="https://github.com/tiennm99/tiennm99.github.io" rel="noopener noreferrer"&gt;my GitHub repo&lt;/a&gt;, or copy it directly from the example in this post.&lt;/p&gt;</description></item></channel></rss>