Skip to content

Commit e9e364e

Browse files
committed
(github actions) Update dist/index.js on pull requests
1 parent c014fe4 commit e9e364e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/compile.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
name: Compile and push dist file
22

3-
on:
4-
push:
5-
branches: [master]
3+
on: [push, pull_request]
64

75
jobs:
86
compile-and-push:
97
runs-on: ubuntu-latest
108
steps:
11-
- uses: actions/checkout@v4
9+
- if: github.event_name != 'pull_request'
10+
uses: actions/checkout@v4
11+
- if: github.event_name == 'pull_request'
12+
uses: actions/checkout@v4
13+
with:
14+
repository: ${{ github.event.pull_request.head.repo.full_name }}
15+
ref: ${{ github.event.pull_request.head.ref }}
1216
- uses: actions/setup-node@v4
1317
with:
1418
node-version: 20

0 commit comments

Comments
 (0)