From 02a36d84d632c1110566d09228251f4a004955fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tlacaelel=20Leon=20Villase=C3=B1or?= Date: Wed, 15 Apr 2026 15:47:13 -0600 Subject: [PATCH 1/2] build(gh pages): build docs-app on release/* branch --- .github/workflows/deploy-ghpages.yml | 4 +++- scripts/ghpages-deploy | 20 ++++++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-ghpages.yml b/.github/workflows/deploy-ghpages.yml index 8b47b62cda..2f0da760aa 100644 --- a/.github/workflows/deploy-ghpages.yml +++ b/.github/workflows/deploy-ghpages.yml @@ -2,7 +2,7 @@ name: Deploy GitHub Pages on: push: - branches: [main] + branches: [main, 'release/*'] jobs: release: @@ -23,10 +23,12 @@ jobs: - name: Install dependencies run: npx ci - name: Build story book artifacts + if: github.ref == 'refs/heads/main' env: NODE_OPTIONS: --max-old-space-size=4096 run: npx nx run components:build-storybook - name: Deploy docs and storybook to GitHub pages env: GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GH }} + DEPLOY_STORYBOOK: ${{ github.ref == 'refs/heads/main' }} run: npm run ghpages:deploy diff --git a/scripts/ghpages-deploy b/scripts/ghpages-deploy index 8d6d624529..93ee0aa191 100644 --- a/scripts/ghpages-deploy +++ b/scripts/ghpages-deploy @@ -13,10 +13,12 @@ rm -rf ./$version mkdir $version cp -r dist/apps/docs-app/* $version -echo "Create or replace storybook dir" -rm -rf ./$storybook_dir -mkdir -p $storybook_dir -cp -r ./dist/storybook/* ./$storybook_dir/ +if [ "$DEPLOY_STORYBOOK" = "true" ]; then + echo "Create or replace storybook dir" + rm -rf ./$storybook_dir + mkdir -p $storybook_dir + cp -r ./dist/storybook/* ./$storybook_dir/ +fi echo "Configuring GIT User" git config user.name github-actions @@ -24,8 +26,14 @@ git config user.email github-actions@github.com echo 'Tracking files' git add -A $version -git add -A $storybook_dir +if [ "$DEPLOY_STORYBOOK" = "true" ]; then + git add -A $storybook_dir +fi echo 'Commiting files' -git commit --no-verify -a -m "feat(): gh-pages update for $version; update storybook pages" +if [ "$DEPLOY_STORYBOOK" = "true" ]; then + git commit --no-verify -a -m "feat(): gh-pages update for $version; update storybook pages" +else + git commit --no-verify -a -m "feat(): gh-pages update for $version" +fi echo 'Pushing files into gh-pages branch' git push origin gh-pages --force From ae2ac3917e2bd12af1ef30be11d003ab7adc4c21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tlacaelel=20Leon=20Villase=C3=B1or?= Date: Wed, 15 Apr 2026 18:38:13 -0700 Subject: [PATCH 2/2] build(ghpages-deploy): consolidate DEPLOY_STORYBOOK checks --- scripts/ghpages-deploy | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/scripts/ghpages-deploy b/scripts/ghpages-deploy index 93ee0aa191..3d9b84b260 100644 --- a/scripts/ghpages-deploy +++ b/scripts/ghpages-deploy @@ -13,27 +13,25 @@ rm -rf ./$version mkdir $version cp -r dist/apps/docs-app/* $version -if [ "$DEPLOY_STORYBOOK" = "true" ]; then - echo "Create or replace storybook dir" - rm -rf ./$storybook_dir - mkdir -p $storybook_dir - cp -r ./dist/storybook/* ./$storybook_dir/ -fi - echo "Configuring GIT User" git config user.name github-actions git config user.email github-actions@github.com echo 'Tracking files' git add -A $version + +commit_msg="feat(): gh-pages update for $version" + if [ "$DEPLOY_STORYBOOK" = "true" ]; then + echo "Create or replace storybook dir" + rm -rf ./$storybook_dir + mkdir -p $storybook_dir + cp -r ./dist/storybook/* ./$storybook_dir/ git add -A $storybook_dir + commit_msg="$commit_msg; update storybook pages" fi + echo 'Commiting files' -if [ "$DEPLOY_STORYBOOK" = "true" ]; then - git commit --no-verify -a -m "feat(): gh-pages update for $version; update storybook pages" -else - git commit --no-verify -a -m "feat(): gh-pages update for $version" -fi +git commit --no-verify -a -m "$commit_msg" echo 'Pushing files into gh-pages branch' git push origin gh-pages --force