diff --git a/.github/workflows/publish-gh-pages.yml b/.github/workflows/publish-gh-pages.yml index 3f96f8d8..ca4523a4 100644 --- a/.github/workflows/publish-gh-pages.yml +++ b/.github/workflows/publish-gh-pages.yml @@ -1,17 +1,69 @@ -name: Deploy Github Pages -run-name: ${{ github.actor }} is deploying the design system to Github Pages -on: - workflow_dispatch: +# Workflow name +name: Build and Publish Storybook to GitHub Pages +run-name: ${{ github.actor }} is deploying the CBP Design System documentation packages to Github Pages +# Event for the workflow to run on +on: push: - tags: - - '*' + branches: + - 'develop' # Grant GITHUB_TOKEN the permissions required to make a Pages deployment permissions: contents: read pages: write # to deploy to Pages id-token: write # to verify the deployment originates from an appropriate source + +# List of jobs +jobs: + deploy: + runs-on: ubuntu-latest + # Job steps + steps: + # Manual Checkout + - uses: actions/checkout@v3 + + # Set up Node + - uses: actions/setup-node@v3 + with: + node-version: '18.x' + + #👇 Add Storybook build and deploy to GitHub Pages as a step in the workflow + - uses: bitovi/github-actions-storybook-to-github-pages@v1.0.1 + with: + install_command: npm ci # default: npm ci + build_command: npm run build-pages # default: npm run build-storybook + path: .public # default: dist/storybook + checkout: false # default: true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jobs: build: