-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 1.1 KB
/
compile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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