Skip to content

ci(pdf): attach README PDF to GitHub Release assets on tag push #25

ci(pdf): attach README PDF to GitHub Release assets on tag push

ci(pdf): attach README PDF to GitHub Release assets on tag push #25

Workflow file for this run

name: Docs - README PDF
on:
push:
branches: [ "main", "develop" ]
paths:
- readme_pdf.md
tags:
- 'v*'
jobs:
docs:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: Install Pandoc
run: sudo apt-get update && sudo apt-get install -y pandoc
- name: Install Tectonic
run: |
curl -fsSL https://drop-sh.fullyjustified.net | sh
sudo mv tectonic /usr/local/bin/tectonic
- name: Generate README PDF
run: |
pandoc readme_pdf.md -o library.pdf \
--pdf-engine=tectonic \
-V mainfont="DejaVu Sans" \
-V monofont="DejaVu Sans Mono" \
-V fontsize=11pt \
-V geometry:margin=1.5cm \
-V linestretch=1.05
- name: Upload README PDF
uses: actions/upload-artifact@v7
with:
name: library-readme-pdf
path: library.pdf
retention-days: 30
- name: Upload PDF to GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b
with:
files: library.pdf