Skip to content

Merge pull request #24688 from backstage/changeset-release/master #9177

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

Merge pull request #24688 from backstage/changeset-release/master #9177

name: Deploy Microsite
on:
push:
branches:
- master
permissions:
contents: read
jobs:
deploy-microsite-and-storybook:
permissions:
contents: write # for JamesIves/github-pages-deploy-action to push changes in repo
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:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
egress-policy: audit
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- name: use node.js 18.x
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
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/github-pages-deploy-action@ec9c88baef04b842ca6f0a132fd61c762aa6c1b0 # v4.6.0
with:
branch: gh-pages
folder: microsite/build