Skip to content

Commit

Permalink
fix: generate previews from forked repos
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaolou86 committed Feb 4, 2024
1 parent 7cb733b commit 757861c
Showing 1 changed file with 9 additions and 24 deletions.
33 changes: 9 additions & 24 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ jobs:
# Debug information
echo "Current directory: $(pwd)"
echo "Contents of the repository:"
branch_name="${{ github.ref }}"
echo "branch_name: $branch_name"
ls -al
echo "Git status:"
git status
Expand All @@ -122,35 +125,17 @@ jobs:
git branch
git branch -a
# Check if commit was successful
if [ $? -eq 0 ]; then
# Debug information
echo "Commit successful. Pushing changes."
# Push changes
git push --set-upstream origin gh-pages
# Check if push was successful
if [ $? -eq 0 ]; then
# Debug information
echo "Push successful."
else
# Debug information
echo "Error: Push failed."
fi
else
# Debug information
echo "Error: Commit failed."
fi
else
# Debug information
echo "No changes found."
fi
env:
#GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
#GITHUB_TOKEN: "${{ secrets.USER_TOKEN }}"
USER_TOKEN: "${{ secrets.USER_TOKEN }}"

- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}

- name: "Send comment to PR"
continue-on-error: true
run: |
Expand Down

0 comments on commit 757861c

Please sign in to comment.