Skip to content

Update main.yml

Update main.yml #72

Workflow file for this run

name: Generate PDF
on:
push:
branches: [ pdf ]
# paths:
# - 'doc/**' # Trigger when docs are updated
jobs:
convert_to_pdf:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install -g markdown-pdf puppeteer
- name: Merge Markdown files
run: |
find doc -type f -name "readme.md" | sort | xargs -I {} sh -c 'cat "$@" >> README.md' _ {}
find doc -type f -name "*.md" ! -name "readme.md" | sort | xargs -I {} sh -c 'cat "$@" >> README.md' _ {}
- name: Convert README.md to README.pdf
run: markdown-pdf -p A4 -m 2cm README.md -o README.pdf
- name: Upload PDF
uses: actions/upload-artifact@v4
with:
name: documentation-pdfs
path: README.pdf