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 5, 2024
1 parent 7cb733b commit ee6b315
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,8 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
with:
node-version: 16
ref: gh-pages
persist-credentials: false
fetch-depth: 0
#token: ${{ secrets.USER_TOKEN }} //null
token: ${{ secrets.GITHUB_TOKEN }}
#USER_TOKEN: ${{ secrets.USER_TOKEN }}

- name: Extract PR details
id: pr
Expand Down Expand Up @@ -118,10 +113,6 @@ jobs:
# Commit changes
git commit -m "$commit_message"
git remote -v
git branch
git branch -a
# Check if commit was successful
if [ $? -eq 0 ]; then
# Debug information
Expand All @@ -147,9 +138,7 @@ jobs:
echo "No changes found."
fi
env:
#GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
#GITHUB_TOKEN: "${{ secrets.USER_TOKEN }}"
USER_TOKEN: "${{ secrets.USER_TOKEN }}"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: "Send comment to PR"
continue-on-error: true
Expand All @@ -158,6 +147,4 @@ jobs:
echo "Your preview build is ready! ✨ Check the following link in 1-2 minutes: https://starknet-io.github.io/starknet-docs/${{ steps.pr.outputs.PR_ID }}/documentation/ ." >/tmp/comment
gh pr comment ${{ github.event.pull_request.number }} -F /tmp/comment
env:
USER_TOKEN: "${{ secrets.USER_TOKEN }}"
#GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
#GH_TOKEN: "${{ github.token }}"
GH_TOKEN: "${{ github.token }}"

0 comments on commit ee6b315

Please sign in to comment.