File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build pull request
2+ on :
3+ pull_request :
4+ types :
5+ - opened
6+ - reopened
7+ - synchronize
8+ concurrency : build-${{ github.ref }}
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ # Run only on PRs from forks.
13+ if : ${{ github.event.pull_request.head.repo.fork }}
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 1
19+ submodules : true
20+ # Build the website
21+ - name : Use Node.js 20
22+ uses : actions/setup-node@v4
23+ with :
24+ node-version : 20
25+ cache : ' npm'
26+ - name : Build
27+ run : |
28+ npm ci
29+ npm run build
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ concurrency: preview-${{ github.ref }}
1010jobs :
1111 pr-preview :
1212 runs-on : ubuntu-latest
13+ # Do not run on PRs from forks, since they don't have the permissions to deploy to our GitHub pages branch.
14+ if : ${{ !github.event.pull_request.head.repo.fork }}
1315 steps :
1416 - name : Create app token
1517 uses : actions/create-github-app-token@v1
You can’t perform that action at this time.
0 commit comments