Add GitHub Actions workflow and scripts for Markdown to PDF conversion - #4
Merged
Merged
Conversation
3dJan
requested review from
alexanderoster and
jordig100
and
a lite review from Copilot
September 18, 2026 06:19
There was a problem hiding this comment.
🟡 Changes recommended
Critical script execution issues and additional conversion reliability concerns must be addressed.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds GitHub Actions automation and scripts to convert Markdown specifications into a downloadable PDF.
Changes:
- Adds print-specific CSS.
- Adds Markdown-to-PDF and wkhtmltopdf installation scripts.
- Adds a workflow to build and upload the PDF artifact.
File summaries
| File | Summary |
|---|---|
markdownToPDF/print.css |
Adds print layout styling. |
markdownToPDF/mdToPDF.sh |
Critical shebang issue (1 vote); moderate error handling, temporary-file, viewport, and API credential concerns. |
markdownToPDF/install_wkhtmltopdf.sh |
Critical shebang issue (1 vote). |
.github/workflows/build.yml |
Critical direct-execution/shebang issue affecting both scripts (1 vote). |
Review details
Suppressed comments (3)
markdownToPDF/mdToPDF.sh:76
- The 1280px viewport is wider than the printable width of an A4 page with these margins, and
--disable-smart-shrinkingprevents wkhtmltopdf from scaling it down. The full-width rules will therefore clip the right side of the document rather than fixing the reported clipping; use a viewport matching the printable width or allow smart shrinking.
--viewport-size 1280x2000 \
--dpi 96 \
--disable-smart-shrinking \
markdownToPDF/mdToPDF.sh:30
- A fixed
temp.htmlis shared by every invocation, so concurrent conversions can overwrite one another and produce a PDF from the wrong document. Allocate a unique temporary file (and clean it up on exit) instead.
TMPFILE="temp.html"
markdownToPDF/mdToPDF.sh:27
- The workflow never sets
GITHUB_API_KEY, so this always configures Grip with an empty credential.grip --exportthen relies on unauthenticated GitHub API requests, making repeated PR builds vulnerable to rate-limit failures; pass the workflow's read-only token to the script or use a rendering path that does not require the API.
echo "PASSWORD = '${GITHUB_API_KEY}'" > ~/.grip/settings.py
- Files reviewed: 4/4 changed files
- Comments generated: 4
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+20
to
+21
| - run: ./markdownToPDF/install_wkhtmltopdf.sh | ||
| - run: ./markdownToPDF/mdToPDF.sh "$SPECNAME" |
Comment on lines
+1
to
+3
| # Copyright (c) 2019 3MF Consortium | ||
| # All rights reserved. | ||
|
|
Comment on lines
+1
to
+3
| # Copyright (c) 2019 3MF Consortium | ||
| # All rights reserved. | ||
|
|
Comment on lines
+26
to
+32
| mkdir -p ~/.grip | ||
| echo "PASSWORD = '${GITHUB_API_KEY}'" > ~/.grip/settings.py | ||
|
|
||
| FILE="$1" | ||
| TMPFILE="temp.html" | ||
|
|
||
| grip "$FILE.md" --export "$FILE.html" |
alexanderoster
approved these changes
Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.