Skip to content

Ivik corrections

Ivik corrections #418

Workflow file for this run

name: "Build Thesis Document for PR"
on:
pull_request:
paths:
- 'report_thesis/**'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
defaults:
run:
working-directory: report_thesis
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/cache@v3
name: Tectonic Cache
with:
path: ~/.cache/tectonic
key: ${{ runner.os }}-tectonic-${{ hashFiles('**/*.tex') }}
restore-keys: |
${{ runner.os }}-tectonic-
- uses: wtfjoke/setup-tectonic@v2
with:
github-token: ${{ secrets.github_token }}
- name: Run Tectonic
run: tectonic -X build
- name: Upload PDF
id: upload_pdf
uses: actions/upload-artifact@v4
with:
name: thesis-pdf
path: report_thesis/build/thesis/thesis.pdf
- name: Post comment with PDF link
uses: actions/github-script@v6
with:
script: |
const artifactUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}/artifacts/${{ steps.upload_pdf.outputs.artifact-id }}`;
const commitHash = context.sha;
const comment = `Built PDF for this PR: [Download PDF](${artifactUrl})\n\nCommit: \`${commitHash}\``;
await github.rest.issues.createComment({
...context.repo,
issue_number: context.issue.number,
body: comment
});
github-token: ${{ secrets.GITHUB_TOKEN }}