Skip to content

Commit

Permalink
[docs-beta] Fix preview links in docs-revamp GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
hellendag committed Aug 29, 2024
1 parent 5317204 commit 4adaf7e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/build-docs-revamp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ jobs:
- name: Get changed docs files for PR comment
if: ${{ github.event.pull_request }}
run: |
cd docs/docs-beta/docs
echo "Head ref is $GITHUB_HEAD_SHA"
git fetch origin $GITHUB_HEAD_SHA
# Compare the commit the branch is based on to its head to list changed files
CHANGED_MD_FILES=$(git diff --name-only HEAD~${{ github.event.pull_request.commits }} "$GITHUB_HEAD_SHA" docs/docs-beta/docs/**/{*.md,*.mdx})
CHANGED_MD_FILES=$(git diff --name-only HEAD~${{ github.event.pull_request.commits }} "$GITHUB_HEAD_SHA" -- '*.md' '*.mdx')
CHANGES_ENTRY=$(echo "$CHANGED_MD_FILES" | sed 's/\.mdx*$//' | sed 's/^docs\/docs-beta\/docs/- {{deploymentUrl}}/')
CHANGES_ENTRY=$(echo -e "Preview available at {{deploymentUrl}}\n\nDirect link to changed pages:\n$CHANGES_ENTRY")
echo "$CHANGES_ENTRY"
Expand Down

0 comments on commit 4adaf7e

Please sign in to comment.