Add support for PDF output #13
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: Generate PDF using Pandoc | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "create_pdf" | |
create_pdf: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Pandoc Docker image v3.1.1.0 | |
container: | |
image: pandoc/latex:3.1.1.0 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
# Run the PDF creation script in the container | |
- uses: docker://pandoc/latex:3.1.1.0 | |
with: | |
entrypoint: './pandoc-docker.sh' | |
# Create an output with the shortened version of the commit SHA | |
- id: short_sha | |
env: | |
GITHUB_SHA: ${{ github.sha }} | |
run: echo "short_sha=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT | |
# Create a release with the PDFs as assets and the shortened SHA as the tag name | |
- uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: v${{ steps.short_sha.outputs.short_sha }} | |
draft: false | |
files: | | |