diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 794298a..697f809 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,45 +3,50 @@ name: Render LaTeX and Publish Release on: push: tags: - - '*' + - "*" jobs: build: runs-on: ubuntu-latest - permissions: + permissions: contents: write steps: - - name: Checkout repository - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v3 - - name: Install LaTeX - run: | - sudo apt-get update - sudo apt-get install -y texlive-fonts-extra texlive-latex-base texlive-science texlive-latex-extra texlive-fonts-recommended latexmk texlive-luatex + - uses: actions/cache@v3 + name: Tectonic Cache + with: + path: ~/.cache/Tectonic + key: ${{ runner.os }}-tectonic-${{ hashFiles('**/*.tex') }} + restore-keys: | + ${{ runner.os }}-tectonic- - - name: Render LaTeX document - run: latexmk -pdflua cv.tex + - uses: wtfjoke/setup-tectonic@v3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Run Tectonic + run: tectonic cv.tex - - name: release - uses: actions/create-release@v1 - id: create_release - with: - draft: false - prerelease: false - # Ref will be tag in this context - release_name: ${{ github.ref }} - tag_name: ${{ github.ref }} - env: - 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: create Release + uses: actions/create-release@v1 + id: create_release + with: + draft: false + prerelease: false + # Ref will be tag in this context + release_name: ${{ github.ref }} + tag_name: ${{ github.ref }} + env: + 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 diff --git a/Justfile b/Justfile index d83f44f..03fdfa5 100644 --- a/Justfile +++ b/Justfile @@ -1,3 +1,6 @@ +test-act: + act -s GITHUB_TOKEN="$(gh auth token)" --container-architecture linux/amd64 + release name: git tag {{name}} git push origin --tags @@ -6,6 +9,4 @@ upload: scp main.pdf cosmos:infrastructure/caddy/files/cv.pdf build: - latexmk -pdf main.tex - latexmk -c - + tectonic cv.tex diff --git a/README.md b/README.md index 65599bf..fb98b96 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,8 @@ My CV, for different applications slight alterations are made and releases cut w A hosted version can be found at +## 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/).