Merge pull request #956 from DTS-STN/release #39
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: Build Storybook & NPM Publish | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish-npm: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install | |
run: npm ci | |
- name: Publish the package | |
run: npm publish --access=public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN_DTSSTN_LOCAL }} | |
build-storybook: | |
runs-on: ubuntu-latest | |
needs: publish-npm | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install | |
run: npm ci | |
- name: Build Storybook | |
run: npm run build-storybook | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
target-folder: main | |
branch: gh-pages | |
folder: storybook-static | |
clean: true |