Skip to content

Commit 717797a

Browse files
authored
Update pages publication and api link (#375)
1 parent 14a7e4f commit 717797a

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

.github/workflows/docs.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,19 @@ jobs:
120120
- name: Update sitemap.xml
121121
run: chmod +x updateSitemap.sh && ./updateSitemap.sh ${{ env.ASSEMBLE_DIR }}/sitemap.xml ${{ env.ASSEMBLE_DIR }}/api
122122

123+
- name: Assemble file
124+
run: cd ${{ env.ASSEMBLE_DIR }} && zip -r ../${{ env.ASSEMBLE_ARTIFACT }} .
125+
123126
- name: Save assembled artifact
124127
uses: actions/upload-artifact@v4
125128
with:
126129
name: kotlinx-rpc-assembled
127130
path: |
128-
${{ env.ASSEMBLE_DIR }}
131+
${{ env.ASSEMBLE_ARTIFACT }}
129132
retention-days: 7
130133

131134
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
133136
environment:
134137
name: github-pages
135138
url: ${{ steps.deployment.outputs.page_url }}
@@ -142,22 +145,22 @@ jobs:
142145
name: kotlinx-rpc-assembled
143146

144147
- 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
146149

147150
- name: Setup Pages
148151
uses: actions/configure-pages@v5
149152

150153
- name: Package and upload Pages artifact
151154
uses: actions/upload-pages-artifact@v3
152155
with:
153-
path: ${{ env.ASSEMBLE_DIR }}
156+
path: publish
154157

155158
- name: Deploy to GitHub Pages
156159
id: deployment
157160
uses: actions/deploy-pages@v4
158161

159162
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
161164
needs: [ build, test, assemble, deploy ]
162165
runs-on: ubuntu-latest
163166
container:
@@ -166,7 +169,7 @@ jobs:
166169
- name: Download artifact
167170
uses: actions/download-artifact@v4
168171
with:
169-
name: kotlinx-rpc-assembled
172+
name: kotlinx-rpc
170173
- name: Unzip artifact
171174
run: |
172175
unzip -O UTF-8 -qq '${{ env.ALGOLIA_ARTIFACT }}' -d algolia-indexes

docs/pages/kotlinx-rpc/cfg/buildprofiles.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
~ Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
3+
~ Copyright 2023-2025 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
44
-->
55

66
<buildprofiles xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/build-profiles.xsd"
@@ -40,6 +40,6 @@
4040
<copyright>2000-2025 JetBrains s.r.o.</copyright>
4141
<link href="https://github.com/Kotlin/kotlinx-rpc/blob/main/CONTRIBUTING.md">Contribute to kotlinx.rpc</link>
4242
<link href="https://kotlinlang.slack.com/archives/C072YJ3Q91V">Slack Community</link>
43-
<link href="%host%/api/">API Reference</link>
43+
<link href="%host%/kotlinx-rpc/api/">API Reference</link>
4444
</footer>
4545
</buildprofiles>

docs/pages/kotlinx-rpc/rpc.tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,5 @@
5050
<toc-element topic="0-2-1.topic"/>
5151
</toc-element>
5252
<toc-element topic="changelog.md"/>
53-
<toc-element toc-title="API Reference" href="%host%/api/"/>
53+
<toc-element toc-title="API Reference" href="%host%/kotlinx-rpc/api/"/>
5454
</instance-profile>

0 commit comments

Comments
 (0)