19.【Marp】Trying to Auto-Generate Slides from Markdown with GitHub Actions — and Getting Stuck on Japanese “Tofu”
tags:
- Markdown
- Marp
- GitHubActions
- GitHubPages
- PowerPoint
🎯 What This Article Is About
In the previous article,
we created presentation slides locally using VS Code + Marp CLI.
- 📝 Write Markdown
- 🌐 Generate HTML / 📊 PPTX
- 👀 Check locally
👉 This article is the continuation.
The goal:
Automatically generate HTML / PPTX with GitHub Actions
just by pushing Markdown.
⚠️ One thing up front:
This is not a success story.
🟥 It is a record of getting stuck on Japanese “tofu” (□).
🏁 The Ideal End State
The ideal setup was very simple.
slides/*.md
↓ push
GitHub Actions
├─ 🌐 Generate HTML
├─ 📊 Generate PPTX
↓
GitHub Pages / Distribution
- 📝 Markdown is the single source of truth
- 🙅 Humans never touch generated files
- 🤖 CI does everything
A classic “automatic slide generation” pipeline.
🧩 What I Did First (Minimal GitHub Actions)
Created .github/workflows/marp-build.yml.
name: Build Marp Slides
on:
push:
paths:
- "slides/**/*.md"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install Marp
run: npm install -g @marp-team/marp-cli
- name: Build HTML
run: marp slides/sample.md --html -o dist/sample.html
- name: Build PPTX
run: marp slides/sample.md --pptx -o dist/sample.pptx
👉 Up to this point, things worked surprisingly smoothly.
🧨 Stumble #1
Markdown Updated, but Pages Didn’t Change
- 📝 Updated
slides/*.mdand pushed - 🤖 GitHub Actions succeeded
- ❓ GitHub Pages output didn’t change
Cause
GitHub Pages:
- ❌ Does not execute Markdown
- ❌ Does not directly read Actions artifacts
- ✅ Only serves committed static files
👉
HTML generated by Actions
is invisible to Pages unless it is committed.
🧨 Stumble #2
Actions Can’t Push (permission denied)
When trying to commit generated HTML:
remote: Permission denied to github-actions[bot]
Cause
GitHub Actions is 🔒 read-only by default.
permissions:
contents: write
must be explicitly specified,
or generated files cannot be pushed.
🧨 Stumble #3
Infinite GitHub Actions Loop
Once Actions could push commits,
it never stopped running.
- 🔁 Actions commits output
- 🔁 Commit triggers push
- 🔁 Actions runs again
Cause
The on: push trigger
included generated files (dist/).
Fix
on:
push:
paths:
- "slides/**/*.md"
👉
Only input Markdown should trigger the workflow.
🚨 The Biggest Problem
Japanese Text Turns into □□□ in PPTX
This is where everything stopped.
- 🌐 HTML: no problem
- 📊 PPTX: Japanese becomes tofu (□)
And worse:
- 💻 Does not happen locally
- 🤖 Happens only in CI
- 👀 Changing viewers doesn’t fully fix it
What Became Clear
- ❌ Not a character encoding issue
- ⚠️ Fonts lack Japanese glyphs
- 💣 Especially dangerous in
code/preblocks
👉
“It looks fine in HTML” ≠ “It’s safe”
❓ Why It’s Still Unresolved
The honest current state:
- ✅ HTML auto-generation: stable
- ✅ Pages deployment: understood
- ✅ CI loop: fixed
❌ Japanese PPTX fonts
cannot be declared “fully solved.”
Workarounds exist, but:
- 🧩 Viewer differences
- 🧩 Environment differences
- 🧩 Long-term reproducibility
mean the design is still unfinished.
🧠 Tentative Conclusion So Far
Not a success yet, but my thinking has settled here:
- 🏗 Slides are not “authored”
- 🏭 Slides are “built”
- 🤖 CI should not be over-engineered
- 📜 Markdown is the only source of truth
Slides are built, not edited
🧾 Summary
Auto-generating slides with
Marp × GitHub Actions is:
- 👍 Easy to make it run
- ⚠️ Hard to make it stable in operation
- 🚧 Japanese PPTX is the final landmine
At the time of writing,
this system is not yet complete.
However:
- 🔍 Why it fails
- 🧩 Where the design pressure points are
can finally be described clearly.
🔜 Planned Next Articles
- Why Japanese “tofu” cannot be fixed by “settings” alone
- Designing font locking via Marp front matter
- A robust (but unfinished) Slide Factory architecture
🔗 Previous Article
18.【Marp】Creating Presentation Slides (HTML / PPTX) from Markdown in VS Code
End.