-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
83 additions
and
1,663 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,31 +84,28 @@ jobs: | |
git config --global user.email "[email protected]" | ||
# Checkout gh-pages branch | ||
git restore uv.lock | ||
git restore . | ||
git fetch origin gh-pages --depth=1 | ||
git checkout gh-pages | ||
# Create preview directory if it doesn't exist | ||
mkdir -p pr-previews | ||
# Check if there are actual changes in the built site | ||
if [ -d "pr-previews/pr-${{ github.event.pull_request.number }}" ]; then | ||
diff -r site/pr-${{ github.event.pull_request.number }} pr-previews/pr-${{ github.event.pull_request.number }} > /dev/null 2>&1 | ||
if [ $? -eq 0 ]; then | ||
echo "No changes in documentation. Skipping deployment." | ||
exit 0 | ||
fi | ||
fi | ||
# Remove old preview if it exists | ||
rm -rf pr-previews/pr-${{ github.event.pull_request.number }} | ||
# Copy new preview | ||
rm -rf pr-previews/pr-${{ github.event.pull_request.number }} | ||
cp -r site/pr-${{ github.event.pull_request.number }} pr-previews/ | ||
# Commit and push | ||
# Check if there are actual changes in git | ||
git add pr-previews | ||
git commit -m "Deploy preview for PR #${{ github.event.pull_request.number }}" || echo "No changes to commit" | ||
git diff --staged --quiet || git push origin gh-pages | ||
if git diff --staged --quiet; then | ||
echo "No changes in documentation. Skipping deployment." | ||
echo "has_changes=false" >> $GITHUB_OUTPUT | ||
exit 0 | ||
fi | ||
# If we get here, there are changes | ||
git commit -m "Deploy preview for PR #${{ github.event.pull_request.number }}" | ||
git push origin gh-pages | ||
echo "has_changes=true" >> $GITHUB_OUTPUT | ||
- name: Post/Update PR Review | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.