Skip to content

Commit a8d9066

Browse files
committed
move commit comment to workflow with access to GITHUB_TOKEN
1 parent 4e26254 commit a8d9066

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

.github/workflows/docs_pr.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,3 @@ jobs:
3838
name: docs
3939
path: upload
4040
if-no-files-found: error
41-
- name: Post comment with preview URL
42-
run: |
43-
curl -L -X POST \
44-
-H "Accept: application/vnd.github+json" \
45-
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
46-
"https://api.github.com/repos/eth-cscs/cscs-docs/issues/${{ github.event.pull_request.number }}/comments" \
47-
-d '{
48-
"body": "preview available: https://docs.tds.cscs.ch/${{ github.event.pull_request.number }}"
49-
}'

.github/workflows/docs_pr_upload.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,12 @@ jobs:
2424
ls -alh
2525
PR_NBR=$(cat pr_number.txt)
2626
curl --data-binary @site.tar.gz -H "Authorization: Bearer ${{ secrets.UPLOAD_TOKEN }}" https://docs.tds.cscs.ch/upload?path=$PR_NBR
27+
- name: Post comment with preview URL
28+
run: |
29+
curl -L -X POST \
30+
-H "Accept: application/vnd.github+json" \
31+
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
32+
"https://api.github.com/repos/eth-cscs/cscs-docs/issues/${{ github.event.pull_request.number }}/comments" \
33+
-d '{
34+
"body": "preview available: https://docs.tds.cscs.ch/${{ github.event.pull_request.number }}"
35+
}'

0 commit comments

Comments
 (0)