Skip to content

Commit f6a5e09

Browse files
takaokoujiclaude
andcommitted
ci: optimize GitHub Actions CI/CD workflow
- 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]>
1 parent fdb6b66 commit f6a5e09

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

.github/workflows/ci-cd.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,7 @@ jobs:
108108
fi
109109
- name: Prepare deployment files
110110
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
111-
run: |
112-
touch build/.nojekyll
113-
echo "smalruby.app" > build/CNAME
111+
run: touch build/.nojekyll
114112
- name: Deploy playground to Smalruby.app GitHub Pages
115113
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3
116114
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
@@ -123,10 +121,8 @@ jobs:
123121
- name: Rebuild for smalruby3-gui GitHub Pages
124122
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
125123
env:
126-
NODE_OPTIONS: --max-old-space-size=4000
127-
NODE_ENV: production
128124
PUBLIC_PATH: /smalruby3-gui/
129-
run: npm run build
125+
run: npm exec node ./scripts/postbuild.mjs
130126
- name: Prepare deployment files for smalruby3-gui GitHub Pages
131127
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
132128
run: touch build/.nojekyll
@@ -151,10 +147,8 @@ jobs:
151147
startsWith(github.ref, 'refs/heads/renovate/')
152148
))
153149
env:
154-
NODE_OPTIONS: --max-old-space-size=4000
155-
NODE_ENV: production
156150
PUBLIC_PATH: /smalruby3-gui/${{ steps.branch.outputs.BRANCH_NAME }}/
157-
run: npm run build
151+
run: npm exec node ./scripts/postbuild.mjs
158152
- name: Prepare deployment files for branch GitHub Pages
159153
if: |
160154
(!(

0 commit comments

Comments
 (0)