Skip to content
Open
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
21 changes: 21 additions & 0 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions dvc.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions paper/paper.tex
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ \section{Section 2}

This is another sentence in the second section.

This was added in a PR.

%--/Paper--

\end{document}
Loading