Closed alexwlchan closed 2 years ago
Here's a snippet from the Azure Pipelines log:
I can't see an obvious issue with the generated HTML – running make build
twice in a local build generates two identical blobs of HTML.
Okay, so I grabbed the HTML from the two Netlify deploy URLs, and I can see this is the difference:
-<link rel="stylesheet" href="/theme/style.css?h=af697fcb96877e1780cc99c12e7e27e5">
+<link rel="stylesheet" href="/theme/style.css?h=4c7cad07998139f1e00852cac5288d56">
so presumably there's a bug in the CSS caching.
Aha, so I think this is the culprit:
checksums = Dir.glob("src/_scss/*.scss").map { |f|
Digest::MD5.file(open f).hexdigest
}
That globbing code probably doesn't have a stable order, so different builds are going in different orders and busting the cache.
I've pushed a fix to live; I'll close this in a few weeks if I haven't seen the issues again.
It looks like this is fixed. The Atom feed is still being re-uploaded every time because it includes the date in the <updated>
tag, but there's no easy way to skip that. One file being re-uploaded every time isn't as big an issue as the entire site.
Somewhere I'm embedding a variable (maybe a date?) that changes every file, slowing down the Netlify deploy. I should find it and fix it!