Skip to content

Commit

Permalink
Merge branch 'mwong-add-preview-link' into test-preview-link-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 authored Oct 4, 2024
2 parents 2d09a8a + e0596c7 commit acc622a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/preview-link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,12 @@ jobs:
- name: Get changed files
id: files
run: |
# Get the list of changed files in the specified directories
CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -E '^website/docs/(docs|best-practices|guides|faqs|reference)/.*\.md$' || true)
echo "Changed files:"
echo "$CHANGED_FILES"
# Check if any files were changed
if [ -z "$CHANGED_FILES" ]; then
echo "No documentation files were changed."
echo "changed_files=" >> $GITHUB_OUTPUT
else
# Convert line-separated files to space-separated for easier handling
CHANGED_FILES="$(echo "$CHANGED_FILES" | tr '\n' ' ')"
CHANGED_FILES=$(echo "$CHANGED_FILES" | tr '\n' ' ')
echo "changed_files=$CHANGED_FILES" >> $GITHUB_OUTPUT
fi
Expand Down

0 comments on commit acc622a

Please sign in to comment.