Skip to content

Commit a109814

Browse files
committed
fix after-ci preview script
1 parent 9a2fb71 commit a109814

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.github/set_docs_preview_url.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
DEPLOY_OUTPUT = os.environ['DEPLOY_OUTPUT']
77
GITHUB_TOKEN = os.environ['GITHUB_TOKEN']
88
REPOSITORY = os.environ['REPOSITORY']
9+
REF = os.environ['REF']
910
ENVIRONMENT = os.environ['ENVIRONMENT']
1011

1112
m = re.search(r'https://(\S+)\.workers\.dev', DEPLOY_OUTPUT)
@@ -26,7 +27,7 @@
2627

2728
deployment_url = f'https://api.github.com/repos/{REPOSITORY}/deployments'
2829
deployment_data = {
29-
'ref': '9616d25acd9d73e36b8e57032fc6bec7e9bb42f1',
30+
'ref': REF,
3031
'task': 'docs preview',
3132
'environment': ENVIRONMENT,
3233
}

.github/workflows/after-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,5 @@ jobs:
8888
DEPLOY_OUTPUT: ${{ steps.deploy.outputs.command-output }}
8989
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9090
REPOSITORY: ${{ github.repository }}
91+
REF: ${{ github.event.workflow_run.head_sha }}
9192
ENVIRONMENT: deploy-preview

0 commit comments

Comments
 (0)