gatsby-build #169
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 | |
on: | |
workflow_dispatch: ~ | |
repository_dispatch: | |
types: gatsby-build | |
push: | |
paths: | |
- 'content/resume/Elkington_Resume.tex' | |
- 'content/resume/resume.cls' | |
jobs: | |
build_latex: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Compile One-Page LaTeX Resume | |
uses: xu-cheng/latex-action@v2 | |
with: | |
root_file: content/resume/Elkington_Resume.tex | |
- name: Move compiled resume into gh-pages branch | |
env: | |
SRC_FILE: 'Elkington_Resume.pdf' | |
TARGET_BRANCH: 'gh-pages' | |
run: | | |
files=$(find $SRC_FILE) # get the file list | |
git config --global user.name 'GitHub Action' | |
git config --global user.email 'action@github.com' | |
git fetch # fetch branches | |
git checkout $TARGET_BRANCH # checkout to your branch | |
git add -A | |
git diff-index --quiet HEAD || git commit -am "deploy files" # commit to the repository (ignore if no modification) | |
git push origin $TARGET_BRANCH # push to remote branch |