This actions compiles a PDF document starting from LaTeX source code and attaches the PDF document as asset in a release.
This example is executed every time a new release is created, resulting in the compilation of PDF document, starting from the repository's LaTeX source code, which is then uploaded as asset in said release.
name: LaTeX document CD
on:
release:
types: [created]
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Build and release LaTeX document
uses: TemplatesHub/gh-action-latex-build-and-release@v2
with:
tex-entry-point: 'main'
pdf-name: 'My_pdf_document'
All the inputs in this action are optional.
Input | Type | Default | Description |
---|---|---|---|
tex-entry-point | string | main | Entry point .tex file used to create the PDF (do not include the file extension) |
pdf-name | string | ${{github.event.repository.name}} | Final PDF file name (do not include the file extension) |
gh-token | string | ${{github.token}} | Token used to upload the PDF to the release |
After the action has completed its execution successfully, you will find the PDF as asset in your latest release. The file name will be:
<pdf-name>-<latest tag>.pdf
Example (using tag v1.0.0 in the release): "My_pdf_document-v1.0.0.pdf"
Please note that, unfortunately, the white spaces in the PDF file name will be replaced with dots automatically by GitHub.