Skip to content

Commit

Permalink
ci: move publish on npm to separate workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
przemyslaw-bak committed Nov 20, 2023
1 parent 13ffc9c commit d7a9c08
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,3 @@ jobs:
run: aws s3 sync ./storybook-static s3://${{ secrets.S3_BUCKET }} --delete
- name: Invalidate Cloudfront
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION }} --paths "/*"
- name: Publish package on NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Publish on npm
on:
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
environment: staging
steps:
- name: Setup Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Publish package on NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit d7a9c08

Please sign in to comment.