Skip to content

Commit

Permalink
Added search indexes publication to Algolia action (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr3zee authored May 27, 2024
1 parent 6ea1ff0 commit e6e680e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
30 changes: 29 additions & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ env:
INSTANCE: 'kotlinx-rpc/rpc'
ARTIFACT: 'webHelpRPC2-all.zip'
DOCKER_VERSION: '241.15989'
ALGOLIA_ARTIFACT: 'algolia-indexes-RPC.zip'
ALGOLIA_APP_NAME: 'MMA5Z3JT91'
ALGOLIA_INDEX_NAME: 'prod_kotlin_rpc'
ALGOLIA_KEY: '${{ secrets.ALGOLIA_KEY }}'
CONFIG_JSON_PRODUCT: 'kotlinx-rpc'
CONFIG_JSON_VERSION: '0.1.0'

jobs:
build:
Expand Down Expand Up @@ -80,4 +86,26 @@ jobs:

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

publish-indexes:
needs: [ build, test, deploy ]
runs-on: ubuntu-latest
container:
image: registry.jetbrains.team/p/writerside/builder/algolia-publisher:2.0.32-3
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: kotlinx-rpc
- name: Unzip artifact
run: |
unzip -O UTF-8 -qq '${{ env.ALGOLIA_ARTIFACT }}' -d algolia-indexes
env algolia-key='${{env.ALGOLIA_KEY}}' java -jar /opt/builder/help-publication-agent.jar \
update-index \
--application-name '${{env.ALGOLIA_APP_NAME}}' \
--index-name '${{env.ALGOLIA_INDEX_NAME}}' \
--product '${{env.CONFIG_JSON_PRODUCT}}' \
--version '${{env.CONFIG_JSON_VERSION}}' \
--index-directory algolia-indexes/ \
2>&1 | tee algolia-update-index-log.txt
4 changes: 4 additions & 0 deletions docs/pages/kotlinx-rpc/cfg/buildprofiles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
<versions-switcher>%docs-raw-path%/help-versions.json</versions-switcher>

<generate-sitemap-url-prefix>https://www.jetbrains.com/help/</generate-sitemap-url-prefix>

<algolia-id>MMA5Z3JT91</algolia-id>
<algolia-index>prod_kotlin_rpc</algolia-index>
<algolia-api-key>119a138f76e4c043bcbb9f0c16119094</algolia-api-key>
</variables>

<build-profile instance="rpc">
Expand Down

0 comments on commit e6e680e

Please sign in to comment.