attempt to fix workflow auth issue #3 #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Workflow | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
name: Publish to NPM | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout "${{ github.event.inputs.branch || github.ref }}" Branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.inputs.branch || github.ref }} | |
- name: Setup Node 18.14.1 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.14.1 | |
- name: Install Dependencies | |
run: npm ci | |
- name: Build Bundle | |
run: npm run build | |
- name: Build Stories | |
run: npm run stories:build | |
- name: Publish "@mui-solutions" Bundle | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
- name: Publish "@mui-solutions/inputs" Bundle | |
uses: JS-DevTools/npm-publish@v3 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
package: './packages/inputs/package.json' | |
- name: Deploy Stories to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
ssh-key: ${{ secrets.DEPLOY_KEY }} | |
branch: gh-pages | |
folder: storybook-static |