diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index 389ad69..7b13c04 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -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 }} diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 0000000..7d7ed03 --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -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 }}