diff --git a/.github/workflows/on_doc_merge.yml b/.github/workflows/on_doc_merge.yml index 6c6c8afd11..e2904c3955 100644 --- a/.github/workflows/on_doc_merge.yml +++ b/.github/workflows/on_doc_merge.yml @@ -15,5 +15,5 @@ jobs: pages: write uses: ./.github/workflows/reusable-publish-docs.yml with: - version: dev + version: stage alias: stage \ No newline at end of file diff --git a/.github/workflows/reusable-publish-docs.yml b/.github/workflows/reusable-publish-docs.yml index 000cee5b20..07f18a4a0a 100644 --- a/.github/workflows/reusable-publish-docs.yml +++ b/.github/workflows/reusable-publish-docs.yml @@ -3,6 +3,7 @@ name: Reusable Publish docs env: BRANCH: main ORIGIN: awslabs/aws-lambda-powertools-typescript + VERSION: "" on: workflow_call: @@ -75,9 +76,10 @@ jobs: git config pull.rebase true git config remote.origin.url >&- || git remote add origin https://github.com/"$ORIGIN" git pull origin "$BRANCH" + - name: Normalize Version Number + run: echo "VERSION=$(echo ${{ inputs.version }} | sed 's/v//')" >> $GITHUB_ENV - name: Build docs website and API reference env: - VERSION: ${{ inputs.version }} ALIAS: ${{ inputs.alias }} run: | rm -rf site @@ -91,8 +93,6 @@ jobs: npm run docs-generateApiDoc - name: Release API docs uses: peaceiris/actions-gh-pages@bd8c6b06eba6b3d25d72b7a1767993c0aeee42e7 # v3.9.2 - env: - VERSION: ${{ inputs.version }} with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./api