You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/run.yml
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@ on:
8
8
9
9
permissions:
10
10
contents: write
11
+
pull-requests: write # Add this for PR comments
11
12
12
13
# Make sure we only ever run one per branch so we don't have issues pushing
13
14
# after running the pipeline
@@ -58,6 +59,26 @@ jobs:
58
59
- run: calkit save -am "Run pipeline"
59
60
env:
60
61
CALKIT_DVC_TOKEN: ${{ secrets.CALKIT_DVC_TOKEN }}
62
+
- name: Upload PDF artifact
63
+
uses: actions/upload-artifact@v4
64
+
with:
65
+
name: paper-pdf
66
+
path: paper/paper.pdf
67
+
if-no-files-found: warn
68
+
- name: Comment on PR with PDF link
69
+
if: github.event_name == 'pull_request'
70
+
uses: actions/github-script@v7
71
+
with:
72
+
script: |
73
+
const fs = require('fs');
74
+
if (fs.existsSync('paper/paper.pdf')) {
75
+
github.rest.issues.createComment({
76
+
issue_number: context.issue.number,
77
+
owner: context.repo.owner,
78
+
repo: context.repo.repo,
79
+
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 }}'
0 commit comments