Skip to content

Commit 742355c

Browse files
authored
Auto deploy to NPM in CD workflow (#181)
1 parent 0117890 commit 742355c

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/CD.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
concurrency: cd-${{ github.ref }}
88

99
jobs:
10-
deploy:
10+
gh-pages:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: P5-wrapper/setup-action@v1
@@ -21,3 +21,16 @@ jobs:
2121
uses: JamesIves/github-pages-deploy-action@v4
2222
with:
2323
folder: dist/demo
24+
25+
npm:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: P5-wrapper/setup-action@v1
29+
with:
30+
token: ${{ secrets.GH_TOKEN }}
31+
32+
- uses: JS-DevTools/npm-publish@v1
33+
with:
34+
token: ${{ secrets.NPM_TOKEN }}
35+
# TODO: remove the dry run declaration after testing CD doesn't throw
36+
dry-run: true

0 commit comments

Comments
 (0)