Skip to content

Commit

Permalink
ci(docs): show pages URL in step summary
Browse files Browse the repository at this point in the history
  • Loading branch information
ThinkChaos committed Jul 14, 2023
1 parent 56633da commit 1f2f875
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/docs.yml
Expand Up @@ -26,10 +26,11 @@ jobs:
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Deploy version for branch
if: ${{ startsWith(github.ref, 'refs/heads/') }}
run: mike deploy --push --update-aliases "$(sed 's:/:-:g' <<< "${GITHUB_REF_NAME}")"

- name: Deploy version for tag and update latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: mike deploy --push --update-aliases "${GITHUB_REF_NAME}" latest
- name: Deploy version
run: |
VERSION="$(sed 's:/:-:g' <<< "$GITHUB_REF_NAME")"
if [[ ${{github.ref}} =~ ^refs/tags/ ]]; then
EXTRA_ALIAS=latest
fi
mike deploy --push --update-aliases "$VERSION" $EXTRA_ALIAS
tr '[:upper:]' '[:lower:]' <<< "https://${{github.repository_owner}}.github.io/${{github.event.repository.name}}/$VERSION/" >> "$GITHUB_STEP_SUMMARY"

0 comments on commit 1f2f875

Please sign in to comment.