From da5c550fa1dd36b25015aa99eb1cc1e0bdfc3833 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Tue, 19 Aug 2025 06:26:37 -0700 Subject: [PATCH 1/3] Add comment on PR with PDF link --- .github/workflows/run.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index 144be10..66da920 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -8,6 +8,7 @@ on: permissions: contents: write + pull-requests: write # Add this for PR comments # Make sure we only ever run one per branch so we don't have issues pushing # after running the pipeline @@ -58,6 +59,26 @@ jobs: - run: calkit save -am "Run pipeline" env: CALKIT_DVC_TOKEN: ${{ secrets.CALKIT_DVC_TOKEN }} + - name: Upload PDF artifact + uses: actions/upload-artifact@v4 + with: + name: paper-pdf + path: paper/paper.pdf + if-no-files-found: warn + - name: Comment on PR with PDF link + if: github.event_name == 'pull_request' + uses: actions/github-script@v7 + with: + script: | + const fs = require('fs'); + if (fs.existsSync('paper/paper.pdf')) { + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: '📄 **Pipeline completed!** The generated PDF is available as an artifact in this workflow run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' + }); + } - name: Save DVC cache id: cache-dvc-save uses: actions/cache/save@v4 From 66e625497159f7fdbb67b5de568125d5787eebd8 Mon Sep 17 00:00:00 2001 From: Pete Bachant Date: Tue, 19 Aug 2025 06:32:35 -0700 Subject: [PATCH 2/3] Delete from paper --- paper/paper.tex | 2 -- 1 file changed, 2 deletions(-) diff --git a/paper/paper.tex b/paper/paper.tex index eb6bd3a..7790868 100644 --- a/paper/paper.tex +++ b/paper/paper.tex @@ -40,8 +40,6 @@ \section{Section 2} This is another sentence in the second section. -This was added in a PR. - %--/Paper-- \end{document} From 253290f6dd86a93c6056ed8f36abc73fef9cffea Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 13:36:20 +0000 Subject: [PATCH 3/3] Run pipeline --- dvc.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dvc.lock b/dvc.lock index 4280a37..4f2c464 100644 --- a/dvc.lock +++ b/dvc.lock @@ -65,13 +65,13 @@ stages: nfiles: 2 - path: paper/paper.tex hash: md5 - md5: 09f2923d7ec5a75fefe95497d6e177cd - size: 678 + md5: 1480301e18c57bf533d604e1a3593101 + size: 653 outs: - path: paper/paper.pdf hash: md5 - md5: bff1721a57af4275b13af9dd8033ad9a - size: 95417 + md5: 13ee8eb76f777de6242c16c15d054673 + size: 94915 _check_env_py: cmd: calkit check conda-env --file environment.yml --output .calkit/env-locks/py.yml