-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from bigladder/setup-markdown-to-pdf
Setup Markdown to PDF tools
- Loading branch information
Showing
2 changed files
with
77 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: "Setup Markdown to PDF tooling" | ||
description: "Setup Markdown to PDF tooling" | ||
inputs: | ||
tinytex-version-year: | ||
description: Year portion of the TinyTeX version number, used for historic TeX Live distributions (https://github.com/rstudio/tinytex-releases/releases) | ||
default: "2024" | ||
required: false | ||
tinytex-version-release: | ||
description: Release portion of the TinyTeX version number (https://github.com/rstudio/tinytex-releases/releases) | ||
default: "02" | ||
required: false | ||
use-historic-texlive-distribution: | ||
description: Used if the TeX Live distribution needs to pull from a historic repository | ||
default: 'false' | ||
required: false | ||
pandoc-version: | ||
description: Pandoc version to install (https://github.com/jgm/pandoc/releases) | ||
default: "2.11.3.2" | ||
required: false | ||
crossref-version: | ||
description: Pandoc cross ref version, needs to match pandoc-version (https://github.com/lierdakil/pandoc-crossref/releases) | ||
default: "0.3.9.0a" | ||
required: false | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Install TinyTeX | ||
uses: r-lib/actions/setup-tinytex@v2 | ||
env: | ||
TINYTEX_INSTALLER: TinyTeX-1 | ||
TINYTEX_VERSION: "${{ inputs.tinytex-version-year }}.${{ inputs.tinytex-version-release }}" | ||
- run: tlmgr --version | ||
shell: pwsh # Needed because tlmgr is .bat file on Windows | ||
- name: Set TeX Live repository | ||
if: inputs.use-historic-texlive-distribution == 'true' | ||
run: tlmgr option repository ftp://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${{ inputs.tinytex-version-year }}/tlnet-final | ||
shell: pwsh # Needed because tlmgr is .bat file on Windows | ||
- name: Update tlmgr | ||
run: tlmgr update --self | ||
shell: pwsh # Needed because tlmgr is .bat file on Windows | ||
- name: Install Pandoc | ||
uses: r-lib/actions/setup-pandoc@v2 | ||
with: | ||
pandoc-version: ${{ inputs.pandoc-version }} | ||
- name: Install Pandoc crossref (Windows) | ||
if: runner.os == 'Windows' | ||
run: | | ||
curl.exe -L --output pandoc-crossref.7z --url https://github.com/lierdakil/pandoc-crossref/releases/download/v${{ inputs.crossref-version }}/pandoc-crossref-${{ runner.os }}.7z | ||
"C:\Program Files\7-Zip\7z.exe" e -y pandoc-crossref.7z -o/c/Users/runneradmin/bin | ||
shell: bash | ||
- name: Install Pandoc crossref (Non-windows) | ||
if: runner.os != 'Windows' | ||
run: | | ||
curl -L --output pandoc-crossref.tar.xz --url https://github.com/lierdakil/pandoc-crossref/releases/download/v${{ inputs.crossref-version }}/pandoc-crossref-${{ runner.os }}.tar.xz | ||
tar -xf pandoc-crossref.tar.xz -C /usr/local/bin | ||
shell: bash |