Skip to content

Commit e3d186b

Browse files
lesbaaLes Moffat
andauthored
Feat/rd 637 add cdn publish action (#166)
* create github action to notify CDN repo * fix(.github): update action to include the build directory --------- Co-authored-by: Les Moffat <[email protected]>
1 parent c7a9ae4 commit e3d186b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/npm-publish.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,18 @@ jobs:
3636
npm publish --tag next
3737
env:
3838
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
39+
40+
- name: Send Dispatch Event to CDN Repo
41+
run: |
42+
curl -X POST \
43+
-H "Authorization: token ${{ secrets.CDN_MAPTILER_TOKEN }}" \
44+
-H "Accept: application/vnd.github.v3+json" \
45+
https://api.github.com/repos/maptiler/cdn.maptiler.com/dispatches \
46+
-d '{ \
47+
"event_type": "repo_release", \
48+
"client_payload": { \
49+
"repo": "${{ github.repository }}", \
50+
"tag": "${{ github.event.release.tag_name }}", \
51+
"build_dir": "build" \
52+
}
53+
}'

0 commit comments

Comments
 (0)