@@ -120,16 +120,19 @@ jobs:
120
120
- name : Update sitemap.xml
121
121
run : chmod +x updateSitemap.sh && ./updateSitemap.sh ${{ env.ASSEMBLE_DIR }}/sitemap.xml ${{ env.ASSEMBLE_DIR }}/api
122
122
123
+ - name : Assemble file
124
+ run : cd ${{ env.ASSEMBLE_DIR }} && zip -r ../${{ env.ASSEMBLE_ARTIFACT }} .
125
+
123
126
- name : Save assembled artifact
124
127
uses : actions/upload-artifact@v4
125
128
with :
126
129
name : kotlinx-rpc-assembled
127
130
path : |
128
- ${{ env.ASSEMBLE_DIR }}
131
+ ${{ env.ASSEMBLE_ARTIFACT }}
129
132
retention-days : 7
130
133
131
134
deploy :
132
- if : github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' && !inputs.dry_run
135
+ if : github.event_name == 'workflow_dispatch' && startsWith( github.ref, 'refs/heads/release-') && !inputs.dry_run
133
136
environment :
134
137
name : github-pages
135
138
url : ${{ steps.deployment.outputs.page_url }}
@@ -142,22 +145,22 @@ jobs:
142
145
name : kotlinx-rpc-assembled
143
146
144
147
- name : Unzip artifact
145
- run : unzip -O UTF-8 -qq '${{ env.ASSEMBLE_ARTIFACT }}' -d ${{ env.ASSEMBLE_DIR }}
148
+ run : unzip -O UTF-8 -qq '${{ env.ASSEMBLE_ARTIFACT }}' -d publish
146
149
147
150
- name : Setup Pages
148
151
uses : actions/configure-pages@v5
149
152
150
153
- name : Package and upload Pages artifact
151
154
uses : actions/upload-pages-artifact@v3
152
155
with :
153
- path : ${{ env.ASSEMBLE_DIR }}
156
+ path : publish
154
157
155
158
- name : Deploy to GitHub Pages
156
159
id : deployment
157
160
uses : actions/deploy-pages@v4
158
161
159
162
publish-indexes :
160
- if : github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' && !inputs.dry_run
163
+ if : github.event_name == 'workflow_dispatch' && startsWith( github.ref, 'refs/heads/release-') && !inputs.dry_run
161
164
needs : [ build, test, assemble, deploy ]
162
165
runs-on : ubuntu-latest
163
166
container :
@@ -166,7 +169,7 @@ jobs:
166
169
- name : Download artifact
167
170
uses : actions/download-artifact@v4
168
171
with :
169
- name : kotlinx-rpc-assembled
172
+ name : kotlinx-rpc
170
173
- name : Unzip artifact
171
174
run : |
172
175
unzip -O UTF-8 -qq '${{ env.ALGOLIA_ARTIFACT }}' -d algolia-indexes
0 commit comments