mirror of
https://github.com/tmaier/asn-qr-code-label-generator.git
synced 2026-03-14 16:43:31 +00:00
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.
37 lines
764 B
YAML
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
|