This commit is contained in:
36
.github/workflows/pandoc-conversion.yml
vendored
Normal file
36
.github/workflows/pandoc-conversion.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Pandoc Conversion
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
convert:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Pandoc
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y pandoc
|
||||
|
||||
- name: Convert Markdown to PDF
|
||||
run: |
|
||||
mkdir -p output
|
||||
for file in *.md; do
|
||||
[ -f "$file" ] || continue
|
||||
pandoc "$file" -o "output/${file%.md}.pdf"
|
||||
done
|
||||
|
||||
- name: Upload PDF files
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: pdf-files
|
||||
path: output/*.pdf
|
||||
Reference in New Issue
Block a user