Skip to content

Enhance PDF workflow: PR preview, commit PDF to repo, better validation - #10

Merged
egonw merged 2 commits into
biohackrxiv:mainfrom
inutano:enhance-workflow
Mar 18, 2026
Merged

egonw merged 2 commits into
biohackrxiv:mainfrom
inutano:enhance-workflow

Conversation

@inutano

@inutano inutano commented Mar 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • PR trigger: Workflow now runs on pull_request to main, so authors can preview PDFs before merging
  • PR comment: Bot automatically comments on PRs with a link to download the generated PDF from artifacts
  • Commit PDF to repo: On push to main, the generated paper.pdf is committed back to the repository so it's always available at paper/paper.pdf without needing to download artifacts (uses [skip ci] to prevent infinite loop)
  • Better validation: Consolidates the 4 separate sed | grep steps into one validation step with clear error messages listing all missing fields at once, with a link to the submitter guide
  • Artifact rename: Changed from "PDF and info.txt" to "paper" for clarity

Before

  • Workflow only ran on push to main
  • Authors had to merge first, then check Actions for the PDF
  • PDF only available as an artifact that expires after 90 days
  • Each missing metadata field failed separately with no helpful message

After

Trigger Behaviour
Push to main Build PDF → upload artifact → commit paper.pdf to repo
Pull request Build PDF → upload artifact → bot comments with download link
  • All missing fields reported at once with a link to documentation
  • PDF always available in the repo at paper/paper.pdf

Test plan

  • Open a test PR to verify the workflow triggers on PRs
  • Verify the bot comment appears with the correct artifact link
  • Verify push to main commits paper.pdf back to the repo
  • Verify the [skip ci] prevents infinite workflow loop
  • Test with missing metadata fields to verify validation error messages

🤖 Generated with Claude Code

inutano and others added 2 commits March 17, 2026 14:29
- Trigger on pull_request in addition to push to main
- Consolidate metadata validation into a single step with clear error messages
- Add PR comment with link to download the generated PDF artifact
- Update artifact name from "PDF and info.txt" to "paper"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On push to main, the workflow now commits paper.pdf to the repo so users
always have the latest PDF available without downloading artifacts.
Uses [skip ci] to prevent infinite loop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@inutano
inutano requested a review from egonw March 17, 2026 07:21
@inutano inutano changed the title Enhance PDF workflow with PR preview and better validation Enhance PDF workflow: PR preview, commit PDF to repo, better validation Mar 17, 2026
@egonw
egonw merged commit bbad392 into biohackrxiv:main Mar 18, 2026
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.

2 participants