Skip to content

Commit 1fe53cd

Browse files
committed
Fix artifacts URL
1 parent b03c455 commit 1fe53cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/artifacts.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313
jobs:
1414
notify:
1515
runs-on: ubuntu-latest
16-
if: ${{ github.event.workflow_run.event == 'pull_request' }}
16+
if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.pull_requests.length > 0 }}
1717
steps:
1818
- uses: actions/github-script@v7
1919
with:
@@ -30,7 +30,7 @@ jobs:
3030
3131
const pullNumber = context.payload.workflow_run.pull_requests[0].number;
3232
const artifactId = artifacts.data.artifacts[0].id;
33-
const artifactUrl = `${context.payload.workflow_run.artifacts_url}/${artifactId}`;
33+
const artifactUrl = `${context.payload.workflow_run.html_url}/artifacts/${artifactId}`;
3434
const commentBody = `<!-- build-artifact-comment -->\n📦 Docs artifacts are ready: ${artifactUrl}`;
3535
3636
const comments = await github.rest.issues.listComments({

0 commit comments

Comments
 (0)