Move to tectonic for local and CI/CD

This commit is contained in:
Joshua Coles 2024-06-05 17:56:29 +01:00
parent 10eb8b14c4
commit f62b26ddb2
3 changed files with 45 additions and 34 deletions

View File

@ -3,45 +3,50 @@ name: Render LaTeX and Publish Release
on: on:
push: push:
tags: tags:
- '*' - "*"
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: write contents: write
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install LaTeX - uses: actions/cache@v3
run: | name: Tectonic Cache
sudo apt-get update with:
sudo apt-get install -y texlive-fonts-extra texlive-latex-base texlive-science texlive-latex-extra texlive-fonts-recommended latexmk texlive-luatex path: ~/.cache/Tectonic
key: ${{ runner.os }}-tectonic-${{ hashFiles('**/*.tex') }}
restore-keys: |
${{ runner.os }}-tectonic-
- name: Render LaTeX document - uses: wtfjoke/setup-tectonic@v3
run: latexmk -pdflua cv.tex with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Tectonic
run: tectonic cv.tex
- name: release - name: create Release
uses: actions/create-release@v1 uses: actions/create-release@v1
id: create_release id: create_release
with: with:
draft: false draft: false
prerelease: false prerelease: false
# Ref will be tag in this context # Ref will be tag in this context
release_name: ${{ github.ref }} release_name: ${{ github.ref }}
tag_name: ${{ github.ref }} tag_name: ${{ github.ref }}
env: env:
GITHUB_TOKEN: ${{ github.token }} GITHUB_TOKEN: ${{ github.token }}
- name: Upload assembled CV
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./cv.pdf
asset_name: cv.pdf
asset_content_type: application/pdf
- name: Upload assembled CV
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./cv.pdf
asset_name: cv.pdf
asset_content_type: application/pdf

View File

@ -1,3 +1,6 @@
test-act:
act -s GITHUB_TOKEN="$(gh auth token)" --container-architecture linux/amd64
release name: release name:
git tag {{name}} git tag {{name}}
git push origin --tags git push origin --tags
@ -6,6 +9,4 @@ upload:
scp main.pdf cosmos:infrastructure/caddy/files/cv.pdf scp main.pdf cosmos:infrastructure/caddy/files/cv.pdf
build: build:
latexmk -pdf main.tex tectonic cv.tex
latexmk -c

View File

@ -4,3 +4,8 @@ My CV, for different applications slight alterations are made and releases cut w
A hosted version can be found at <https://files.joshuacoles.me/cv.pdf> A hosted version can be found at <https://files.joshuacoles.me/cv.pdf>
## Building
Currently the CV is built using [`tectonic`](https://tectonic-typesetting.github.io/en-US/) for a nicer build experience. This can be installed as described [here](https://tectonic-typesetting.github.io/en-US/install.html).
Commands are managed using the [Just runner](https://just.systems/).