Skip to content

fix: create public/blog/<post>/ before copying tex+pdf#29

Merged
Gavin-WangSC merged 1 commit intoComputerization:mainfrom
Gavin-WangSC:fix/create-public-blog-dir
Apr 29, 2026
Merged

fix: create public/blog/<post>/ before copying tex+pdf#29
Gavin-WangSC merged 1 commit intoComputerization:mainfrom
Gavin-WangSC:fix/create-public-blog-dir

Conversation

@Gavin-WangSC
Copy link
Copy Markdown
Contributor

Summary

  • Follow-up to fix: keep publish job alive when one post's LaTeX fails #28. The merged change moved the sha256 write to after pdfgenr succeeds, but that write was implicitly creating public/blog/<post>/ via the File class's os.makedirs side effect.

  • Without it, the first new post (2026-02-15) crashes the publish job again:

    FileNotFoundError: [Errno 2] No such file or directory: './public/blog/2026-02-15/index.tex'
    
  • Fix: have pdfgenr create the destination directory explicitly so neither code path depends on File()'s side effect.

  • Confirmed in the failed run that the resilience change from fix: keep publish job alive when one post's LaTeX fails #28 is working — 2026-02-13 now logs LaTeX failed: 2026-02-13 (no PDF produced); skipping instead of crashing. This second failure is a regression I introduced; this PR closes it.

Test plan

  • Re-run Generate New Article (or wait for the next scheduled trigger).
  • Confirm 2026-02-13 is logged as a skip and 2026-02-15 onward compile and commit.

Previous commit moved the sha256 write to after pdfgenr success.
That sha256 write was implicitly creating the destination directory
via the File class's makedirs. Without it, shutil.copy now fails
with FileNotFoundError on the very first new post (2026-02-15).

Make pdfgenr create the output dir explicitly so neither code path
relies on File()'s side effect.
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 29, 2026

Deploy Preview for c13n-newsletter ready!

Name Link
🔨 Latest commit ca9a429
🔍 Latest deploy log https://app.netlify.com/projects/c13n-newsletter/deploys/69f196818ff65b0008b75880
😎 Deploy Preview https://deploy-preview-29--c13n-newsletter.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Gavin-WangSC Gavin-WangSC merged commit 08ff9eb into Computerization:main Apr 29, 2026
4 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.

1 participant