Skip to content

Add workflow to generate, test, and publish presentation PDF - #4

Merged
ehsteve merged 17 commits into
mainfrom
copilot/add-pdf-output-workflow
Sep 15, 2026
Merged

ehsteve merged 17 commits into
mainfrom
copilot/add-pdf-output-workflow

Conversation

Copilot AI commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

This PR adds automated PDF output for releases by introducing a GitHub Actions workflow that renders the Reveal.js deck and attaches the PDF to the release, and adds workflow-level test coverage on pull requests.

  • Workflow trigger + permissions

    • Added .github/workflows/release-pdf.yml to run on release.published and on pull requests targeting main.
    • Scoped workflow permissions to contents: write for release asset upload.
  • PDF generation on runner

    • Sets up Node.js and installs puppeteer.
    • Uses a small inline Node ESM script to open local index.html?print-pdf and export swxsoc-presentation.pdf.
  • Workflow-level test

    • Added a validation step (test -s swxsoc-presentation.pdf) to ensure PDF generation succeeds and produces a non-empty file on CI runs.
  • Release asset publishing

    • Uploads swxsoc-presentation.pdf to the published release via GitHub CLI (gh release upload ... --clobber), gated to release events only.
on:
  pull_request:
    branches:
      - main
  release:
    types: [published]

jobs:
  build-pdf:
    steps:
      - uses: actions/checkout@...
      - uses: actions/setup-node@...
      - run: npm install puppeteer
      - run: node --input-type=module <<'EOF'
          # render index.html?print-pdf -> swxsoc-presentation.pdf
        EOF
      - run: test -s swxsoc-presentation.pdf
      - if: ${{ github.event_name == 'release' }}
        run: gh release upload "${{ github.event.release.tag_name }}" swxsoc-presentation.pdf --clobber

Copilot AI linked an issue May 19, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add GitHub workflow for PDF output on releases Add release workflow to generate and publish presentation PDF May 19, 2026
Copilot AI requested a review from ehsteve May 19, 2026 14:10
@ehsteve

ehsteve commented May 19, 2026

Copy link
Copy Markdown
Contributor

@copilot is it possible to add a test?

Copilot AI commented May 19, 2026

Copy link
Copy Markdown
Contributor Author

@copilot is it possible to add a test?

Added a workflow-level test in commit 54b4977: the PDF workflow now runs on pull requests to main and includes a Test generated PDF step (test -s swxsoc-presentation.pdf). Release asset upload is now gated to release events only.

Copilot AI changed the title Add release workflow to generate and publish presentation PDF Add workflow to generate, test, and publish presentation PDF May 19, 2026
@ehsteve
ehsteve requested a review from Copilot May 19, 2026 20:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a GitHub Actions workflow to automatically render the Reveal.js deck to a PDF on CI, validate the output, and (on published releases) upload the PDF as a release asset. This fits the repo’s GitHub Pages-oriented deck by providing a consistent, automated “export to PDF” artifact for releases.

Changes:

  • Introduces a release-pdf workflow that runs on PRs to main and on release.published.
  • Generates swxsoc-presentation.pdf using Puppeteer against index.html?print-pdf.
  • Validates the generated PDF is non-empty and uploads it to the GitHub release (release events only).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release-pdf.yml Outdated
Comment thread .github/workflows/release-pdf.yml
Comment thread .github/workflows/release-pdf.yml
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: ehsteve <739053+ehsteve@users.noreply.github.com>
@ehsteve
ehsteve marked this pull request as ready for review September 14, 2026 16:50
@ehsteve

ehsteve commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Ran this locally and produced this file
swxsoc-presentation.pdf

@ehsteve
ehsteve merged commit 4bffb88 into main Sep 15, 2026
@ehsteve
ehsteve deleted the copilot/add-pdf-output-workflow branch September 15, 2026 13:35
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.

Add PDF output

3 participants