asn-qr-code-label-generator/.github/workflows/generate-pdf.yml
Claude f58462df32
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.
2025-11-23 16:34:11 +00:00

37 lines
764 B
YAML

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