|
|
@@ -10,34 +10,24 @@ on:
|
|
|
permissions: {}
|
|
|
|
|
|
jobs:
|
|
|
- doc:
|
|
|
+ build:
|
|
|
+ name: Build storybook
|
|
|
+ uses: ./.github/workflows/shared-component-storybook-build.yml
|
|
|
+
|
|
|
+ publish:
|
|
|
name: Publish storybook
|
|
|
runs-on: ubuntu-latest
|
|
|
+ needs: build
|
|
|
environment: SharedComponents
|
|
|
steps:
|
|
|
- - name: 🧮 Checkout code
|
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
|
|
-
|
|
|
- - uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
|
|
|
- - name: 🔧 Pnpm cache
|
|
|
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
|
|
|
+ - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
|
|
|
with:
|
|
|
- cache: "pnpm"
|
|
|
- node-version-file: package.json
|
|
|
-
|
|
|
- - name: 🔨 Install dependencies
|
|
|
- working-directory: packages/shared-components
|
|
|
- run: "pnpm install --frozen-lockfile"
|
|
|
-
|
|
|
- - name: 📖 Build Storybook
|
|
|
- working-directory: packages/shared-components
|
|
|
- run: pnpm build:storybook
|
|
|
+ name: shared-components-storybook
|
|
|
+ path: storybook-static
|
|
|
|
|
|
- name: 🚀 Deploy to Cloudflare Pages
|
|
|
uses: cloudflare/wrangler-action@9681c2997648301493e78cacbfb790a9f19c833f # v3
|
|
|
with:
|
|
|
apiToken: ${{ secrets.CF_PAGES_TOKEN }}
|
|
|
accountId: ${{ secrets.CF_PAGES_ACCOUNT_ID }}
|
|
|
- workingDirectory: "packages/shared-components"
|
|
|
- packageManager: "pnpm"
|
|
|
command: pages deploy storybook-static --project-name=shared-components-storybook
|