-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Build LaTeX document & latexdiff to previous tagged version. | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout new version | ||
uses: actions/checkout@v2 | ||
with: | ||
path: new | ||
fetch-depth: 0 | ||
- name: Set last tag value | ||
run: | | ||
echo ::set-output name=LAST_TAG_NAME::"$(cd new && git describe --tag HEAD^ --abbrev=0)" | ||
id: tag_val_stp | ||
- name: Checkout old version | ||
uses: actions/checkout@v2 | ||
with: | ||
path: old | ||
ref: ${{ steps.tag_val_stp.outputs.LAST_TAG_NAME }} | ||
- name: Compile LaTeX document | ||
uses: xu-cheng/latex-action@v2 | ||
with: | ||
root_file: whitepaper.tex | ||
working_directory: new/ | ||
- name: Install latexdiff | ||
run: sudo apt-get install latexdiff | ||
- name: Run latexdiff | ||
run: latexdiff -t UNDERLINE --verbose --no-links --flatten old/whitepaper.tex new/whitepaper.tex > new/diff.tex | ||
- name: Compile LaTeX difference document | ||
uses: xu-cheng/latex-action@v2 | ||
with: | ||
root_file: diff.tex | ||
working_directory: new/ | ||
- name: Check pdf files | ||
run: | | ||
file new/diff.pdf | grep -q ' PDF ' | ||
- name: Upload | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: paper | ||
path: | | ||
new/diff.pdf | ||
new/whitepaper.pdf |