diff --git a/.github/workflows/cicd.yaml b/.github/workflows/cicd.yaml index 6f2308c..7afc0cb 100644 --- a/.github/workflows/cicd.yaml +++ b/.github/workflows/cicd.yaml @@ -198,6 +198,51 @@ jobs: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: pnpm exec semantic-release -d ${{ github.event.inputs.dry_run }} + storybook: + needs: [release] + if: + ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' && + needs.release.result == 'success' }} + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup PNPM + uses: pnpm/action-setup@v3 + with: + run_install: false + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: package.json + cache: 'pnpm' + cache-dependency-path: pnpm-lock.yaml + + - name: Install dependencies + run: pnpm install + + - name: Build the TSDoc + run: pnpm storybook:build + + - name: Setup Pages + uses: actions/configure-pages@v5 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: './storybook-static' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + sync_readme: needs: [release] if: