-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (29 loc) · 1 KB
/
generate-pdf.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Generate and Commit eBook PDF via Asciidoctor
on:
push:
paths:
- '**.adoc' # Trigger on changes to .adoc files
workflow_dispatch: # Allow manual triggering
jobs:
generate-pdf:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- name: Install asciidoctor-pdf
run: |
gem install asciidoctor-pdf
- name: Generate PDF
run: |
asciidoctor-pdf -o docs/asciidoc/ebook-smartcard-contactless-raspberry-pi.pdf docs/asciidoc/index.adoc
- name: Commit eBook PDF
run: |
git config --local user.email 41898282+github-actions[bot]@users.noreply.github.com
git config --local user.name github-actions[bot]
git add docs/asciidoc/ebook-smartcard-contactless-raspberry-pi.pdf
git commit -m "Update eBook PDF" || echo "No changes to commit"
git push