Skip to content

Commit ca8a8b8

Browse files
committed
properly parse tag
1 parent 0a345a6 commit ca8a8b8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/pages.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,22 @@ jobs:
2525
${{ runner.os }}-node-
2626
- name: Get Tag
2727
id: tag
28-
uses: dawidd6/action-get-tag@v1
28+
- uses: actions/github-script@v3
29+
with:
30+
github-token: ${{secrets.GITHUB_TOKEN}}
31+
result-encoding: string
32+
script: |
33+
const ref = process.env.GITHUB_REF
34+
if(!ref.startsWith('refs/tags/'))
35+
return ''
36+
return ref.replace(/^refs\/tags\//, '')
2937
- name: Generate Docs
3038
run: |
3139
echo $SOURCE_TAG
3240
npm ci
3341
npm run release_docs
3442
env:
35-
SOURCE_TAG: ${{ steps.tag.outputs.tag }}
43+
SOURCE_TAG: ${{ steps.tag.outputs.result }}
3644
- name: Deploy
3745
uses: peaceiris/[email protected]
3846
with:

0 commit comments

Comments
 (0)