19.【Marp】Trying to Auto-Generate Slides from Markdown with GitHub Actions — and Getting Stuck on Japanese “Tofu”

tags:


🎯 What This Article Is About

In the previous article,
we created presentation slides locally using VS Code + Marp CLI.

👉 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

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

Cause

GitHub Pages:

👉
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.

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.

And worse:

What Became Clear

👉
“It looks fine in HTML” ≠ “It’s safe”


❓ Why It’s Still Unresolved

The honest current state:

Japanese PPTX fonts
cannot be declared “fully solved.”

Workarounds exist, but:

mean the design is still unfinished.


🧠 Tentative Conclusion So Far

Not a success yet, but my thinking has settled here:

Slides are built, not edited


🧾 Summary

Auto-generating slides with
Marp × GitHub Actions is:

At the time of writing,
this system is not yet complete.

However:

can finally be described clearly.


🔜 Planned Next Articles


🔗 Previous Article

18.【Marp】Creating Presentation Slides (HTML / PPTX) from Markdown in VS Code


End.