Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post link to logs when build fails #1

Merged
merged 1 commit into from
Nov 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 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
paper/${{ 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
16 changes: 13 additions & 3 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
paper/${{ 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"