Deploy to main by @RohanAlexander #166
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build LaTeX document | |
run-name: Deploy ${{ github.event.head_commit.message }} | |
to main by @${{ github.actor }} | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- embeddings.bib | |
- embeddings.tex | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build_latex: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v3 | |
- name: Compile LaTeX document | |
uses: xu-cheng/latex-action@v3 | |
with: | |
root_file: embeddings.tex | |
latexmk_shell_escape: true | |
continue_on_error: true | |
docker_image: ghcr.io/xu-cheng/texlive-full:20230701 | |
- name: Upload PDF file | |
uses: actions/upload-artifact@v3 | |
with: | |
name: PDF | |
path: embeddings.pdf | |
- name: Commit changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "Vicki Boykis" | |
git fetch origin main | |
git stash | |
git rebase origin/main # keep all other changes | |
git stash pop | |
git add embeddings.pdf | |
git commit -m "Regenerate PDF from ${{ github.sha }}" | |
git push --force # overwrite old PDF | |
if: github.event_name != 'pull_request' |