Skip to content

update permissions and add storybook to gitignore #64

update permissions and add storybook to gitignore

update permissions and add storybook to gitignore #64

Workflow file for this run

name: path
on:
push:
branches:
- main
workflow_dispatch:
defaults:
run:
shell: bash
permissions:
contents: read
pages: write
id-token: write
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
ssBtn: ${{ steps.filter.outputs.ssBtn }}
ssHeader: ${{ steps.filter.outputs.ssHeader }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Check for changes
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
ssBtn:
- 'package/ss-button/**'
ssHeader:
- 'package/ss-header/**'
ssBtn:
needs: changes
if: ${{ needs.changes.outputs.ssBtn == 'true' }}
name: create build
uses: ./.github/workflows/build.yml
with:
working-directory: package/ss-button
ssBtnPublish:
needs: [ssHeader, ssBtn]
if: ${{ always() && needs.ssBtn.result == 'success' && (needs.ssHeader.result == 'success' || needs.ssHeader.result == 'skipped') }}
name: publish package
uses: ./.github/workflows/publish-package.yml
with:
working-directory: package/ss-button
secrets:
MY_SECRET: ${{ secrets.NPM_PUBLISH_WORKFLOW }}
ssHeader:
needs: changes
if: ${{ needs.changes.outputs.ssHeader == 'true' }}
name: create build
uses: ./.github/workflows/build.yml
with:
working-directory: package/ss-header
ssHeaderPublish:
needs: [ssHeader, ssBtn]
if: ${{ always() && needs.ssHeader.result == 'success' && (needs.ssBtn.result == 'success' || needs.ssBtn.result == 'skipped') }}
name: publish package
uses: ./.github/workflows/publish-package.yml
with:
working-directory: package/ss-header
secrets:
MY_SECRET: ${{ secrets.NPM_PUBLISH_WORKFLOW }}
publish-storybook:
runs-on: ubuntu-latest
needs: [ssHeaderPublish, ssBtnPublish]
if: ${{ always() &&( (needs.ssHeaderPublish.result == 'success' && (needs.ssBtnPublish.result == 'success' || needs.ssBtnPublish.result == 'skipped')) || (needs.ssBtnPublish.result == 'success' && (needs.ssHeaderPublish.result == 'success' || needs.ssHeaderPublish.result == 'skipped')) )}}
defaults:
run:
working-directory: storybook
steps:
# Manual Checkout
- uses: actions/checkout@v4
# Set up Node
- uses: actions/setup-node@v4
with:
node-version: '18.x'
#👇 Add Storybook build and deploy to GitHub Pages as a step in the workflow
- uses: bitovi/[email protected]
with:
install_command: npm install # default: npm ci
build_command: npm run build-storybook # default: npm run build-storybook
path: storybook-static # default: dist/storybook
checkout: false # default: true