Add GHA to add a comment displaying preview information on each opened PR #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Show preview on PRs | |
on: | |
pull_request: | |
push: | |
# types: [opened] | |
env: | |
CURRENT_BRANCH: ${{ github.event.pull_request.head.ref }} | |
jobs: | |
link-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# - name: Set current branch name | |
# run: echo "name=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_OUTPUT | |
# id: current_branch | |
- name: Display preview URL | |
run: | | |
echo $CURRENT_BRANCH | |
echo 'https://website-git-deploy-preview-mei-16-meili.vercel.app/docs/branch%3A'$CURRENT_BRANCH |