@@ -106,13 +106,11 @@ jobs:
106106 if [[ ${{ contains(github.ref, 'hotfix') }} == 'true' ]]; then
107107 sed -e "s|hotfix/REPLACE|${{ github.ref_name }}|" --in-place release.config.js
108108 fi
109- - name : Deploy playground to GitHub Pages
110- uses : peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3
109+ - name : Prepare deployment files
111110 if : github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
112- with :
113- github_token : ${{ secrets.GITHUB_TOKEN }}
114- publish_dir : ./build
115- full_commit_message : " Build for ${{ github.sha }} ${{ github.event.head_commit.message }}"
111+ run : |
112+ touch build/.nojekyll
113+ echo "smalruby.app" > build/CNAME
116114 - name : Deploy playground to Smalruby.app GitHub Pages
117115 uses : peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3
118116 if : github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
@@ -122,9 +120,52 @@ jobs:
122120 full_commit_message : " Build for ${{ github.sha }} ${{ github.event.head_commit.message }}"
123121 cname : smalruby.app
124122 external_repository : smalruby/smalruby.app
123+ - name : Rebuild for smalruby3-gui GitHub Pages
124+ if : github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
125+ env :
126+ NODE_OPTIONS : --max-old-space-size=4000
127+ NODE_ENV : production
128+ PUBLIC_PATH : /smalruby3-gui/
129+ run : npm run build
130+ - name : Prepare deployment files for smalruby3-gui GitHub Pages
131+ if : github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
132+ run : touch build/.nojekyll
133+ - name : Deploy playground to GitHub Pages
134+ uses : peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3
135+ if : github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
136+ with :
137+ github_token : ${{ secrets.GITHUB_TOKEN }}
138+ publish_dir : ./build
139+ full_commit_message : " Build for ${{ github.sha }} ${{ github.event.head_commit.message }}"
125140 - name : Set branch name
126141 id : branch
127142 run : echo "BRANCH_NAME=${{ github.head_ref || github.ref_name }}" >> $GITHUB_OUTPUT
143+ - name : Rebuild for branch GitHub Pages
144+ if : |
145+ (!(
146+ github.ref == 'refs/heads/develop' ||
147+ github.ref == 'refs/heads/master' ||
148+ github.ref == 'refs/heads/main' ||
149+ startsWith(github.ref, 'refs/heads/hotfix/') ||
150+ startsWith(github.ref, 'refs/heads/dependabot/') ||
151+ startsWith(github.ref, 'refs/heads/renovate/')
152+ ))
153+ env :
154+ NODE_OPTIONS : --max-old-space-size=4000
155+ NODE_ENV : production
156+ PUBLIC_PATH : /smalruby3-gui/${{ steps.branch.outputs.BRANCH_NAME }}/
157+ run : npm run build
158+ - name : Prepare deployment files for branch GitHub Pages
159+ if : |
160+ (!(
161+ github.ref == 'refs/heads/develop' ||
162+ github.ref == 'refs/heads/master' ||
163+ github.ref == 'refs/heads/main' ||
164+ startsWith(github.ref, 'refs/heads/hotfix/') ||
165+ startsWith(github.ref, 'refs/heads/dependabot/') ||
166+ startsWith(github.ref, 'refs/heads/renovate/')
167+ ))
168+ run : touch build/.nojekyll
128169 - name : Deploy playground to GitHub Pages for branch
129170 if : |
130171 (!(
0 commit comments