Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃懛 Simple gitaction for auto PDF creation #33

Closed
wants to merge 5 commits into from
Closed
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/convert-to-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Wersje tekstowe to PDF
# This workflow is triggered on pushes to the repository.
on:
push:
branches:
- main
# Paths can be used to only trigger actions when you have edited certain files, such as a file within the /docs directory
paths:
- 'wersje tekstowe/**.md'
- 'wersje tekstowe/images/**'
Comment on lines +9 to +10
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe let's stick to polish or english lang.


jobs:
converttopdf:
name: Build PDF
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
fanooel marked this conversation as resolved.
Show resolved Hide resolved
- uses: baileyjm02/markdown-to-pdf@v1.2.0
with:
input_dir: wersje tekstowe
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

previous versions of this action accepted the input_dir input. This is still accepted as input for backwards compatibility, but passing a directory as input_path now carries out the same functionality.

https://github.com/BaileyJM02/markdown-to-pdf#github-action-inputs

output_dir: wersje pdf
images_dir: wersje tekstowe/images

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe stick to Polish and change images to obrazy? It would be nice to create an empty folder and place .gitkeep inside until the 1st image is created

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also consider removing empty spaces from file and directory names.
It may cauze unexpected results while used with software not supporting it.

# for example <img src="./images/file-name.png">
image_import: ./images
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bior膮c pod uwag臋, 偶e w projekcie nie ma 偶adnych obrazk贸w -> mo偶e konfiguracj臋聽dla obrazk贸w mo偶na pomin膮膰?

# Default is true, can set to false to only get PDF files
build_html: false
build_pdf: true
- uses: actions/upload-artifact@v3.1.2
with:
name: Ustawy o PIT
path: wersje pdf