Skip to content

Commit 160f539

Browse files
authored
chore(ci): add version number normalization to docs publishing (#1433)
1 parent 29d529b commit 160f539

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: .github/workflows/on_doc_merge.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ jobs:
1515
pages: write
1616
uses: ./.github/workflows/reusable-publish-docs.yml
1717
with:
18-
version: dev
18+
version: stage
1919
alias: stage

Diff for: .github/workflows/reusable-publish-docs.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Reusable Publish docs
33
env:
44
BRANCH: main
55
ORIGIN: awslabs/aws-lambda-powertools-typescript
6+
VERSION: ""
67

78
on:
89
workflow_call:
@@ -75,9 +76,10 @@ jobs:
7576
git config pull.rebase true
7677
git config remote.origin.url >&- || git remote add origin https://github.com/"$ORIGIN"
7778
git pull origin "$BRANCH"
79+
- name: Normalize Version Number
80+
run: echo "VERSION=$(echo ${{ inputs.version }} | sed 's/v//')" >> $GITHUB_ENV
7881
- name: Build docs website and API reference
7982
env:
80-
VERSION: ${{ inputs.version }}
8183
ALIAS: ${{ inputs.alias }}
8284
run: |
8385
rm -rf site
@@ -91,8 +93,6 @@ jobs:
9193
npm run docs-generateApiDoc
9294
- name: Release API docs
9395
uses: peaceiris/actions-gh-pages@bd8c6b06eba6b3d25d72b7a1767993c0aeee42e7 # v3.9.2
94-
env:
95-
VERSION: ${{ inputs.version }}
9696
with:
9797
github_token: ${{ secrets.GITHUB_TOKEN }}
9898
publish_dir: ./api

0 commit comments

Comments
 (0)