-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (30 loc) · 977 Bytes
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Deploy
on:
pull_request:
types: [closed]
branches:
- release
jobs:
build:
if: github.event.pull_request.merged
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# The branch, tag or SHA to checkout. When checking out the repository that
# triggered a workflow, this defaults to the reference or SHA for that event.
# Otherwise, defaults to `master`.
ref: "dev"
- name: npm install
run: |
cd $GITHUB_WORKSPACE
npm i
- name: build package
run: |
cd $GITHUB_WORKSPACE
npm run build
- name: publish to npm
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./package.json