Skip to content

Merge pull request #19904 from backstage/changeset-release/master #9

Merge pull request #19904 from backstage/changeset-release/master

Merge pull request #19904 from backstage/changeset-release/master #9

name: Deploy Microsite
on:
push:
branches:
- master
jobs:
deploy-microsite-and-storybook:
runs-on: ubuntu-latest
env:
CI: true
NODE_OPTIONS: --max-old-space-size=8192
DOCUSAURUS_SSR_CONCURRENCY: 5
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v3
- name: use node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: https://registry.npmjs.org/ # Needed for auth
# We avoid caching in this workflow, as we're running an install of both the top-level
# dependencies and the microsite. We leave it to the main master workflow to produce the
# cache, as that results in a smaller bundle.
- name: top-level yarn install
run: yarn install --immutable
- name: microsite yarn install
run: yarn install --immutable
working-directory: microsite
- name: storybook yarn install
run: yarn install --immutable
working-directory: storybook
- name: build API reference
run: yarn build:api-docs
- name: build microsite
run: yarn build
working-directory: microsite
- name: build storybook
run: yarn build-storybook
working-directory: storybook
- name: move storybook dist into microsite
run: mv storybook/dist/ microsite/build/storybook
- name: Check the build output
run: ls microsite/build && ls microsite/build/storybook
- name: Deploy both microsite and storybook to gh-pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: microsite/build