Skip to content

Commit 5b481ab

Browse files
committed
Use repository dispatch to trigger publisher deployment
1 parent bdc4f4c commit 5b481ab

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
on:
22
issue_comment:
33
types: [created]
4+
repository_dispatch:
5+
types: [published]
46
jobs:
57
deploy:
68
if: |
7-
github.event.issue.number == 1
8-
&& github.event.comment.user.login == 'andrewbranch'
9+
github.event_name == 'repository_dispatch' ||
10+
github.event_name == 'issue_comment'
11+
&& github.event.issue.number == 1
12+
&& github.actor == 'andrewbranch'
913
&& startsWith(github.event.comment.body, '/deploy publisher')
1014
runs-on: ubuntu-latest
1115
steps:

.github/workflows/publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,9 @@ jobs:
4343
run: npx lerna publish from-git --yes
4444
env:
4545
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
46+
- name: trigger publisher deploy
47+
uses: peter-evens/[email protected]
48+
with:
49+
token: ${{ secrets.REPO_ACCESS_TOKEN }}
50+
event-type: published
51+

0 commit comments

Comments
 (0)