Deploy Merge pull request #27 from bfgray3/yhat move hat over y to main by @veekaybee #150
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@v2 | |
with: | |
root_file: embeddings.tex | |
latexmk_shell_escape: true | |
continue_on_error: true | |
- name: Upload PDF file | |
uses: actions/upload-artifact@v3 | |
with: | |
name: PDF | |
path: embeddings.pdf | |
- name: Commit changes | |
run: | | |
git config --local user.email "vicki.boykis@gmail.com" | |
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' |