Skip to content

Commit

Permalink
Create GitHub action to generate PDF of Surge XT Manual
Browse files Browse the repository at this point in the history
  • Loading branch information
mthierman committed May 30, 2022
1 parent 1c48dce commit 6cad55d
Show file tree
Hide file tree
Showing 3 changed files with 207 additions and 55 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/surge-xt-manual-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Surge XT Manual PDF

on:
push:
paths:
- 'manual_xt/**'
pull_request:
paths:
- 'manual_xt/**'

permissions:
contents: write

jobs:
Surge-XT-Manual-PDF:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build PDF
run: >
wget -q https://github.com/jgm/pandoc/releases/download/2.18/pandoc-2.18-1-amd64.deb;
sudo apt install ./pandoc-2.18-1-amd64.deb;
wget -q https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb;
sudo apt install ./wkhtmltox_0.12.6-1.focal_amd64.deb;
cd manual_xt;
pandoc -f gfm -t html Surge-XT.md -o Surge-XT-Manual.pdf
--css pdf.css -V title:""
--pdf-engine-opt="--footer-font-name" --pdf-engine-opt="Lato"
--pdf-engine-opt="--footer-font-size" --pdf-engine-opt="12"
--pdf-engine-opt="--footer-center" --pdf-engine-opt="[page]/[topage]"
--pdf-engine-opt="--no-footer-line" --pdf-engine-opt="--footer-spacing" --pdf-engine-opt="5"
--pdf-engine-opt="--disable-smart-shrinking"
--pdf-engine-opt="--zoom" --pdf-engine-opt="1"
- name: Release
uses: softprops/action-gh-release@v0.1.14
with:
tag_name: surge-xt-manual
name: Surge XT Manual
body: PDF of the [Surge XT Manual](https://surge-synthesizer.github.io/manual-xt/)
files: |
manual_xt/Surge-XT-Manual.pdf
Loading

0 comments on commit 6cad55d

Please sign in to comment.