Skip to content

Commit

Permalink
fix: generate previews from forked repos (#1097)
Browse files Browse the repository at this point in the history
* Update _typos.toml

* fix: generate previews from forked repos

* fix: generate previews from forked repos

* fix: generate previews from forked repos

* fix: generate previews from forked repos

* fix: generate previews from forked repos

* fix: generate previews from forked repos

* fix: generate previews from forked repos

* fix: generate previews from forked repos

* fix: generate previews from forked repos

* fix: generate previews from forked repos

* fix: generate previews from forked repos

* fix: generate previews from forked repos

* fix: generate previews from forked repos

* fix: generate previews from forked repos

* fix: generate previews from forked repos

* fix: generate previews from forked repos

* fix: generate previews from forked repos

* fix: typo

* fix: generate previews from forked repos

* fix: generate previews from forked repos

---------

Co-authored-by: Steve Goodman <[email protected]>
  • Loading branch information
xiaolou86 and stoobie authored Feb 26, 2024
1 parent 5563a8f commit f37a901
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: Pull request workflow

on:
pull_request:
pull_request_target:
types:
- opened
- reopened
- synchronize
branches:
- '*'
- 'main'
- 'dev'

# push:
# branches:
# - main
permissions:
contents: write

jobs:

Expand All @@ -24,7 +28,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
with:
node-version: 16
ref: refs/pull/${{ github.event.pull_request.number }}/merge

- name: Install Node.js
uses: actions/setup-node@v2
Expand Down Expand Up @@ -53,9 +57,8 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
with:
node-version: 16
ref: gh-pages
USER_TOKEN: ${{ secrets.USER_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Extract PR details
id: pr
Expand Down Expand Up @@ -88,9 +91,9 @@ jobs:
ls -al
echo "Git status:"
git status
git config user.name "GitHub Actions"
git config user.email [email protected]
git add .
Expand All @@ -105,7 +108,7 @@ jobs:
# Commit changes
git commit -m "$commit_message"
# Check if commit was successful
if [ $? -eq 0 ]; then
# Debug information
Expand Down Expand Up @@ -140,5 +143,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 }}"
GH_TOKEN: "${{ github.token }}"

0 comments on commit f37a901

Please sign in to comment.