Update main.yml #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Convert Markdown to PDF | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
convert: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Create file list | |
id: files_list | |
run: | | |
mkdir output | |
echo "files=$(printf '"%s" ' ${{ github.workspace }}/document/0.1/*.md)" > $GITHUB_OUTPUT | |
- name: Convert Markdown to PDF | |
uses: docker://pandoc/latex:2.9 | |
with: | |
args: --output=output/output.pdf ${{ steps.files_list.outputs.files }} | |
- name: Upload PDF artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: output-pdf | |
path: output/output.pdf |