Skip to content

Conversation

takaokouji
Copy link

Summary

  • Remove redundant CNAME creation that duplicates peaceiris/actions-gh-pages functionality
  • Simplify GitHub Pages rebuild steps to only run postbuild.mjs instead of full build
  • Remove unnecessary environment variables from rebuild steps

Implementation Details

  1. Removed redundant CNAME creation (L113): The echo "smalruby.app" > build/CNAME command was redundant since peaceiris/actions-gh-pages already handles CNAME creation through the cname parameter

  2. Simplified smalruby3-gui GitHub Pages rebuild (L123): Changed from npm run build to npm exec node ./scripts/postbuild.mjs since the initial webpack build is already complete

  3. Simplified branch GitHub Pages rebuild (L143): Applied the same optimization as above

  4. Removed unnecessary environment variables: Removed NODE_OPTIONS and NODE_ENV from rebuild steps since they're only needed for the full build process

Test Plan

  • Verify CI/CD workflow runs successfully on develop branch
  • Confirm GitHub Pages deployment works correctly for main repository
  • Test branch-specific GitHub Pages deployment functionality
  • Validate that postbuild.mjs correctly processes PUBLIC_PATH environment variable

🤖 Generated with Claude Code

takaokouji and others added 2 commits September 16, 2025 03:53
- Remove redundant CNAME creation (L113) as peaceiris/actions-gh-pages
  handles it with cname parameter
- Simplify "Rebuild for smalruby3-gui GitHub Pages" step to only run
  postbuild.mjs instead of full npm run build
- Simplify "Rebuild for branch GitHub Pages" step to only run
  postbuild.mjs instead of full npm run build
- Remove unnecessary NODE_OPTIONS and NODE_ENV environment variables
  from rebuild steps

These changes eliminate duplicate build processes and improve workflow
efficiency since the initial webpack build already completed before
these rebuild steps.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Replace touch build/.nojekyll with rm -f build/CNAME in smalruby3-gui
  GitHub Pages deployment step
- .nojekyll already exists from smalruby.app deployment since they share
  the same build directory
- Remove CNAME file created for smalruby.app to prevent domain conflicts
  with smalruby3-gui GitHub Pages

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@takaokouji takaokouji merged commit d2fb8e9 into develop Sep 15, 2025
2 of 6 checks passed
@takaokouji takaokouji deleted the improve/ci-cd-workflow branch September 15, 2025 19:25
github-actions bot pushed a commit that referenced this pull request Sep 15, 2025
…-workflow

ci: optimize GitHub Actions CI/CD workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant