diff --git a/.github/workflows/deploy-github-storybook.yml b/.github/workflows/deploy-github-storybook.yml new file mode 100644 index 000000000..066c07517 --- /dev/null +++ b/.github/workflows/deploy-github-storybook.yml @@ -0,0 +1,29 @@ +# Workflow taken from the Storybook docs: https://storybook.js.org/docs/sharing/publish-storybook#github-pages +name: Build and Publish Storybook to GitHub Pages + +on: + push: + branches: + - 'staging' + +permissions: + contents: read + pages: write + id-token: write + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20.x' + + - uses: bitovi/github-actions-storybook-to-github-pages@v1.0.3 + with: + install_command: yarn install + build_command: yarn build-storybook + path: storybook-static + checkout: false diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 194b0c659..3e76a0ac7 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -14,3 +14,5 @@ jobs: run: yarn - name: Test run: yarn run jest --ci + - name: Build + run: NEXT_PUBLIC_TARGET_ENV=staging yarn build diff --git a/README.md b/README.md index 52675d4fa..9c1717f31 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # 🌲 Terramatch Web Platform 🌲 +### Storybook +We host the `staging` build of Storybook on [Github Pages](https://wri.github.io/wri-terramatch-website/) + ### Installation ```