diff --git a/.github/workflows/storybook-pages.yml b/.github/workflows/storybook-pages.yml new file mode 100644 index 00000000000..0e84b6df80f --- /dev/null +++ b/.github/workflows/storybook-pages.yml @@ -0,0 +1,34 @@ +name: Storybook GitHub Pages + +on: + workflow_dispatch: + +permissions: + contents: write + +jobs: + deploy: + runs-on: ubuntu-latest + if: ${{ github.repository == 'woocommerce/woocommerce' }} + + steps: + - name: Checkout + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + ref: trunk + fetch-depth: 0 + + - name: Setup WooCommerce Monorepo + uses: ./.github/actions/setup-woocommerce-monorepo + with: + install: true + + - name: Build Storybook + run: pnpm --filter='@woocommerce/storybook' build-storybook --quiet + + - name: Deploy + uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./tools/storybook/storybook-static + force_orphan: true