Skip to content

format fixes

format fixes #223

Workflow file for this run

name: Compile
on:
push:
branches: [ main ]
workflow_dispatch:
branches: [ main ]
jobs:
compile:
name: Compile
runs-on: ubuntu-22.04
if: ${{ github.event_name != 'push' || vars.BUILD_ALWAYS == 1 }}
permissions:
contents: write
steps:
- name: ⏹️ Cancel previous runs
uses: pierreraffa/cancel-previous-runs-action@1.11
- name: ✴️️ Checkout repo
uses: actions/checkout@v4
- name: 🏗️ Compile
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
extra_fonts: ./fonts/*
latexmk_use_xelatex: true
post_compile: make terms && make compile
- name: 📦 Upload artifact
uses: actions/upload-artifact@v4
with:
name: dissertation
path: main.pdf
- name: 🎁 Draft release
uses: ncipollo/release-action@v1.14.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: main.pdf
allowUpdates: true
artifactContentType: application/pdf
replacesArtifacts: true
prerelease: true
tag: "latest"
deploy:
name: Share
runs-on: ubuntu-22.04
needs: compile
steps:
- name: ✴️️ Checkout target
uses: actions/checkout@v4
with:
token: ${{ secrets.OUTPUT_REPO_PAT }}
repository: ${{ vars.OUTPUT_REPO }}
ref: ${{ vars.OUTPUT_BRANCH }}
- name: 😺 Setup git config
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "<>"
- name: ⬇️ Download artifact
uses: actions/download-artifact@v4
with:
name: dissertation
path: ${{ vars.OUTPUT_PATH }}
- name: 🙈 Rename output file
run: mv ${{ vars.OUTPUT_PATH }}/main.pdf ${{ vars.OUTPUT_PATH }}/${{ vars.OUTPUT_FNAME }}
- name: Update version
run: (cd site && npm run release)
- name: 🚀 Commit and push
run: |
export COMMIT_MESSAGE="Compiled dissertation from @${{ github.sha }}"
git add .
git commit -m "$COMMIT_MESSAGE"
git push