Skip to content

Commit 3d0ad03

Browse files
committed
fixup! feat(docs): add workflow to generate documentation on PR merge
1 parent 5954aec commit 3d0ad03

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/check-and-gen.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ defaults:
1414
shell: bash
1515

1616
concurrency:
17-
group: ${{ github.workflow }}-${{ github.ref }}
18-
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
17+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
18+
cancel-in-progress: true
1919

2020
permissions:
2121
contents: write
@@ -119,9 +119,11 @@ jobs:
119119
with:
120120
github-token: ${{ secrets.GITHUB_TOKEN }}
121121
script: |
122+
const { context } = require('@actions/github');
123+
const prNumber = context.payload.pull_request.number;
122124
const comment = 'CLI documentation has been generated and pushed to the branch.';
123125
await github.issues.createComment({
124126
...context.repo,
125-
issue_number: context.payload.pull_request.number,
127+
issue_number: prNumber,
126128
body: comment
127-
});
129+
});

0 commit comments

Comments
 (0)