Skip to content

Commit 4e3fc1d

Browse files
committed
post link to logs when build fails
1 parent c38c9fc commit 4e3fc1d

File tree

3 files changed

+28
-8
lines changed

3 files changed

+28
-8
lines changed

.github/workflows/build-latex-diff.yml

+14-4
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,31 @@ jobs:
1919
with:
2020
fetch-depth: 0
2121
- name: Compile LaTeX diff
22+
id: compileLaTeXdiff
2223
uses: xu-cheng/latex-action@v3
2324
with:
2425
root_file: |
2526
${{ env.PAPER }}-diff${{ env.MAIN }}.tex
26-
working_directory: .
27+
working_directory: paper
2728
extra_system_packages: "git patch"
2829
latexmk_shell_escape: true
2930
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
3031
env:
3132
TEXINPUTS: ".:$PWD/../latex-styles-master/styles//:"
3233
BSTINPUTS: ".:$PWD/../latex-styles-master/styles/common"
3334
BIBINPUTS: ".:$PWD/../latex-styles-master/share"
35+
continue-on-error: true
3436
- name: Upload PDF
35-
uses: actions/upload-artifact@v2
37+
if: steps.compileLaTeXdiff.outcome == 'success'
38+
uses: actions/upload-artifact@v3
3639
with:
37-
name: DiffPDF
40+
name: Success--Here-is-the-Diff-PDF
3841
path: |
39-
${{ env.PAPER }}-diff${{ env.MAIN }}.pdf
42+
paper/${{ env.PAPER }}-diff${{ env.MAIN }}.pdf
43+
- name: Upload build logs
44+
if: steps.compileLaTeXdiff.outcome == 'failure'
45+
uses: actions/upload-artifact@v3
46+
with:
47+
name: Diff-Build-Failed--Here-are-the-Logs
48+
path: |
49+
paper/**/*.log

.github/workflows/build-latex.yml

+13-3
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,31 @@ jobs:
1818
with:
1919
fetch-depth: 0
2020
- name: Compile LaTeX document
21+
id: compileLaTeXdocument
2122
uses: xu-cheng/latex-action@v3
2223
with:
2324
root_file: |
2425
${{ env.PAPER }}.tex
25-
working_directory: .
26+
working_directory: paper
2627
extra_system_packages: "git patch"
2728
latexmk_shell_escape: true
2829
pre_compile: git config --global --add safe.directory /github/workspace
2930
env:
3031
TEXINPUTS: ".:$PWD/../latex-styles-master/styles//:"
3132
BSTINPUTS: ".:$PWD/../latex-styles-master/styles/common"
3233
BIBINPUTS: ".:$PWD/../latex-styles-master/share"
34+
continue-on-error: true
3335
- name: Upload PDF
36+
if: steps.compileLaTeXdocument.outcome == 'success'
3437
uses: actions/upload-artifact@v3
3538
with:
36-
name: PDF
39+
name: Success--Here-is-the-PDF
3740
path: |
38-
${{ env.PAPER }}.pdf
41+
paper/${{ env.PAPER }}.pdf
42+
- name: Upload build logs
43+
if: steps.compileLaTeXdocument.outcome == 'failure'
44+
uses: actions/upload-artifact@v3
45+
with:
46+
name: Build-Failed--Here-are-the-Logs
47+
path: |
48+
paper/**/*.log

.github/workflows/pr-comment.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ jobs:
1414
env:
1515
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1616
with:
17-
prefix: "Here is the compiled"
17+
prefix: "Status:"
1818
format: "name"
1919
addTo: "pull"

0 commit comments

Comments
 (0)