Skip to content

Commit 1887280

Browse files
committed
fix use comment for docs preview URL
1 parent 3b25848 commit 1887280

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/set_docs_preview_url.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
GITHUB_TOKEN = os.environ['GITHUB_TOKEN']
88
REPOSITORY = os.environ['REPOSITORY']
99
PULL_REQUEST_NUMBER = os.environ['PULL_REQUEST_NUMBER']
10+
REF = os.environ['REF']
1011

1112
m = re.search(r'https://(\S+)\.workers\.dev', DEPLOY_OUTPUT)
1213
assert m, f'Could not find worker URL in {DEPLOY_OUTPUT!r}'
@@ -42,6 +43,10 @@
4243
4344
<table>
4445
<tr>
46+
<td><strong>commit:</strong></td>
47+
<td><code>{REF:.7}</code></td>
48+
</tr>
49+
<tr>
4550
<td><strong>Preview URL:</strong></td>
4651
<td><a href="{preview_url}">{preview_url}</a></td>
4752
</tr>

.github/workflows/after-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,4 @@ jobs:
9494
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9595
REPOSITORY: ${{ github.repository }}
9696
PULL_REQUEST_NUMBER: ${{ github.event.workflow_run.pull_requests[0].number }}
97+
REF: ${{ github.event.workflow_run.head_sha }}

0 commit comments

Comments
 (0)