-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgithub-actions-generate-pdf.yml
More file actions
52 lines (40 loc) · 1.33 KB
/
github-actions-generate-pdf.yml
File metadata and controls
52 lines (40 loc) · 1.33 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Generate PDF with asciidoctor
run-name: ${{ github.actor }} is creating the pdf document
on:
push:
branches:
- main
jobs:
Generate-PDF-file:
# Set the job to run on Ubuntu
runs-on: ubuntu-latest
# Set up the job environment
steps:
# Checkout the repository
- name: Checkout
uses: actions/checkout@v3
# Set up git user that will push the PDF file
- name: Setup the git admin with push access
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
# Set up the Ruby environment
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
# Install asciidoctor
- name: Install asciidoctor
run: gem install asciidoctor
# Install asciidoctor-pdf
- name: Install asciidoctor-pdf
run: gem install asciidoctor-pdf
# Generate the PDF file
- name: Generate the PDF file
run: asciidoctor-pdf --theme ./Assets/pdf/themes/my-theme.yml BOOK.adoc -o ./Build/AWESOME_PYTHON.pdf
# Commit the PDF file
- name: Commit the generated PDF file
run: |
git add .
git commit -m "[#####] - ${{ github.actor }} published the pdf document"
git push