Add GitHub workflow for PDF generation using Playwright

Create a workflow that generates a DIN A4 PDF of the print version
of index.html and stores it as an artifact. Uses Playwright with
Chromium to load the page, wait for QR codes to render, and
generate the PDF.
This commit is contained in:
Claude 2025-11-23 16:34:11 +00:00
parent 9b596b5506
commit f58462df32
No known key found for this signature in database
3 changed files with 90 additions and 0 deletions

37
.github/workflows/generate-pdf.yml vendored Normal file
View file

@ -0,0 +1,37 @@
name: Generate PDF Labels
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
jobs:
generate-pdf:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Install Playwright Chromium
run: npx playwright install chromium
- name: Generate PDF
run: npm run generate-pdf
- name: Upload PDF artifact
uses: actions/upload-artifact@v4
with:
name: asn-labels-pdf
path: asn-labels.pdf
retention-days: 30