Skip to content

Commit be0b341

Browse files
committed
fixup! feat(docs): add workflow to generate documentation on PR merge
1 parent e627adb commit be0b341

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

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

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

2020
permissions:
@@ -110,7 +110,7 @@ jobs:
110110
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
111111
git add .
112112
git commit -m "docs: update API documentation via docsgen-cli"
113-
BRANCH_NAME=$(echo $GITHUB_HEAD_REF | sed 's/refs\/heads\///')
113+
BRANCH_NAME=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
114114
git push https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.actor }}/lotus.git HEAD:$BRANCH_NAME
115115
116116
- name: Comment on the pull request
@@ -126,4 +126,4 @@ jobs:
126126
...context.repo,
127127
issue_number: prNumber,
128128
body: comment
129-
});
129+
});

0 commit comments

Comments
 (0)