Skip to content

Use thmtools for declaring theorems #14

Use thmtools for declaring theorems

Use thmtools for declaring theorems #14

Workflow file for this run

name: build pdf
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "**.tex"
- "**.bib"
jobs:
build:
runs-on: ubuntu-latest
env:
# one filename per line, including directory if in a subdirectory
FILES: |
note.tex
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install and run Git hooks
run: |
git config core.hooksPath .githooks/
git checkout
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v3
with:
root_file: ${{ env.FILES }}
latexmk_shell_escape: true
work_in_root_file_dir: true
docker_image: ghcr.io/xu-cheng/texlive-full:20230801
- name: Move output pdf's preserving directory structure
run: |
mkdir github-artifacts
echo -n "${{ env.FILES }}" | awk '{$1=$1};1' | sed "s/.tex$/.pdf/g" | rsync -a --files-from=- . ./github-artifacts
- name: Upload pdf's as artifact
uses: actions/upload-artifact@v4
with:
name: pdfs
path: ./github-artifacts
deploy:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: github-artifacts
- name: Move pdf
run: mkdir -p github-deploy && mv github-artifacts/*/* github-deploy
- name: Deploy on orphan branch
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./github-deploy
publish_branch: build
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
# remove this option if you want to have all builds preserved in the build directory
force_orphan: true
- name: Delete artifacts
uses: geekyeggo/delete-artifact@v5
with:
name: pdfs