Skip to content

Commit

Permalink
post link to logs when build fails
Browse files Browse the repository at this point in the history
  • Loading branch information
dpo committed Nov 11, 2023
1 parent c38c9fc commit 99370c2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/build-latex-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,31 @@ jobs:
with:
fetch-depth: 0
- name: Compile LaTeX diff
id: compileLaTeXdiff
uses: xu-cheng/latex-action@v3
with:
root_file: |
${{ env.PAPER }}-diff${{ env.MAIN }}.tex
working_directory: .
working_directory: paper
extra_system_packages: "git patch"
latexmk_shell_escape: true
pre_compile: git config --global --add safe.directory /github/workspace && latexdiff-vc --git --flatten --disable-auto-mbox --exclude-safecmd="Cref,Cref\*,hspace" -r ${{ env.MAIN }} ${{ env.PAPER }}.tex
env:
TEXINPUTS: ".:$PWD/../latex-styles-master/styles//:"
BSTINPUTS: ".:$PWD/../latex-styles-master/styles/common"
BIBINPUTS: ".:$PWD/../latex-styles-master/share"
continue-on-error: true
- name: Upload PDF
uses: actions/upload-artifact@v2
if: steps.compileLaTeXdiff.outcome == 'success'
uses: actions/upload-artifact@v3
with:
name: DiffPDF
name: Success--Here-is-the-Diff-PDF
path: |
${{ env.PAPER }}-diff${{ env.MAIN }}.pdf
- name: Upload build logs
if: steps.compileLaTeXdiff.outcome == 'failure'
uses: actions/upload-artifact@v3
with:
name: Diff-Build-Failed--Here-are-the-Logs
path: |
paper/**/*.log
14 changes: 12 additions & 2 deletions .github/workflows/build-latex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,31 @@ jobs:
with:
fetch-depth: 0
- name: Compile LaTeX document
id: compileLaTeXdocument
uses: xu-cheng/latex-action@v3
with:
root_file: |
${{ env.PAPER }}.tex
working_directory: .
working_directory: paper
extra_system_packages: "git patch"
latexmk_shell_escape: true
pre_compile: git config --global --add safe.directory /github/workspace
env:
TEXINPUTS: ".:$PWD/../latex-styles-master/styles//:"
BSTINPUTS: ".:$PWD/../latex-styles-master/styles/common"
BIBINPUTS: ".:$PWD/../latex-styles-master/share"
continue-on-error: true
- name: Upload PDF
if: steps.compileLaTeXdocument.outcome == 'success'
uses: actions/upload-artifact@v3
with:
name: PDF
name: Success--Here-is-the-PDF
path: |
${{ env.PAPER }}.pdf
- name: Upload build logs
if: steps.compileLaTeXdocument.outcome == 'failure'
uses: actions/upload-artifact@v3
with:
name: Build-Failed--Here-are-the-Logs
path: |
paper/**/*.log
2 changes: 1 addition & 1 deletion .github/workflows/pr-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
prefix: "Here is the compiled"
prefix: "Status:"
format: "name"
addTo: "pull"

0 comments on commit 99370c2

Please sign in to comment.