Skip to content

release: applying package updates - react v8 #5629

release: applying package updates - react v8

release: applying package updates - react v8 #5629

# Workflow name
name: 'Docsite publish to Github Pages'
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
outputs:
artifact_id: ${{ steps.artifact_upload.outputs.artifact_id }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3
with:
main-branch-name: 'master'
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'yarn'
- name: Install packages
run: yarn install --frozen-lockfile
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
- name: Affected Deployable Storybooks
id: affected_storybooks_count
run: |
affected_count=$(yarn --silent nx show projects -t build-storybook:docsite --affected --verbose false | wc -l | tr -d ' ')
echo "value=$affected_count" >> $GITHUB_OUTPUT
- name: Build affected storybooks
if: steps.affected_storybooks_count.outputs.value > 0
run: |
yarn nx run-many -t build-storybook:docsite --nxBail
- name: Prepare Artifact
if: steps.affected_storybooks_count.outputs.value > 0
run: |
rm -rf _pages
mkdir -p _pages/react _pages/charts _pages/web-components
cp -R apps/public-docsite-v9/dist/react/* _pages/react/
cp -R apps/chart-docsite/dist/storybook/* _pages/charts/
cp -R packages/web-components/dist/storybook/* _pages/web-components
- name: Upload Pages Artifact
if: steps.affected_storybooks_count.outputs.value > 0
id: artifact_upload
uses: actions/upload-pages-artifact@v3
with:
path: _pages
deploy:
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.artifact_id
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4