Build LaTex Document #6
Workflow file for this run
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: 'Build LaTex Document' | |
on: | |
push: | |
release: | |
types: [published] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
#Checks-out the repository | |
- name: Checkout | |
uses: actions/checkout@v3 | |
#Enable cache | |
- uses: actions/cache@v3 | |
name: Tectonic Cache | |
with: | |
path: ~/.cache/Tectonic | |
key: ${{ runner.os }}-tectonic-${{ hashFiles('**/*.tex') }} | |
restore-keys: | | |
${{ runner.os }}-tectonic- | |
# Setup tectonic | |
- name: Install Tectonic | |
uses: wtfjoke/setup-tectonic@e61d40cc462e10ce897e140d3ddc8fa76ac55a5f # v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
tectonic-version: 0.14.1 | |
# Run tectonic to compile document | |
- name: Compile TeX file | |
run: | | |
tectonic charte_internet_asso.tex | |
tectonic charte_internet_particuliers_anglais.tex | |
tectonic charte_internet_particuliers.tex | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: PDF file | |
path: "*.pdf" | |
if-no-files-found: error | |
retention-days: 5 | |
# Upload pdf file in GitHub release | |
- if: ${{ github.event_name == 'release'}} | |
name: Upload pdf to release | |
uses: svenstaro/upload-release-action@2b9d2847a97b04d02ad5c3df2d3a27baa97ce689 # v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: "*.pdf" | |
asset_name: main.pdf | |
tag: ${{ github.ref }} | |
overwrite: true | |
file_glob: true | |
body: "PDF compiled from source" |