Skip to content

Update readme.txt

Update readme.txt #332

Workflow file for this run

name: Compile
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: [ main ]
paths-ignore:
- '.github/*'
- '.gitignore'
- 'Dockerfile'
workflow_dispatch:
branches: [ main ]
jobs:
compile:
name: Compile
runs-on: ubuntu-22.04
if: ${{ github.event_name != 'push' || vars.BUILD_ALWAYS == 1 }}
permissions: write-all
steps:
- name: ✴️️ Checkout repo
uses: actions/checkout@v4
- name: 🔖 Set tag
id: meta
run: x="${{ github.ref_name }}"; echo "tag=${x/main/latest}" >> $GITHUB_OUTPUT
- name: 🗄️ Make source deposit
run: make sources.zip && ls -l sources.zip && md5sum sources.zip
- name: 🌬️ Update Zenodo files
run: |
curl -H 'Authorization: Bearer ${{ secrets.ZENODO_TOKEN }}' --upload-file sources.zip https://zenodo.org/api/files/${{ secrets.ZENODO_BUCKET }}/sources.zip
curl -H 'Authorization: Bearer ${{ secrets.ZENODO_TOKEN }}' --upload-file readme.txt https://zenodo.org/api/files/${{ secrets.ZENODO_BUCKET }}/readme.txt
- name: 🏗️ Compile
uses: xu-cheng/latex-action@v3
with:
root_file: main.tex
extra_fonts: ./fonts/*
latexmk_use_xelatex: true
post_compile: make -j 4 terms && make -j 4 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 }}
tag: ${{ steps.meta.outputs.tag }}
draft: ${{ github.ref_name == 'main' }}
artifacts: |
main.pdf
readme.txt
allowUpdates: true
removeArtifacts: true
replacesArtifacts: true
- name: 🌬️ Upload compiled version to Zenodo
run: |
curl -H 'Authorization: Bearer ${{ secrets.ZENODO_TOKEN }}' --upload-file main.pdf https://zenodo.org/api/files/${{ secrets.ZENODO_BUCKET }}/dissertation.pdf
deploy:
name: Share
runs-on: ubuntu-22.04
needs: compile
steps:
- name: ✴️️ Checkout target
uses: actions/checkout@v4
with:
token: ${{ secrets.GH_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