Skip to content
This repository was archived by the owner on Oct 2, 2024. It is now read-only.

Commit c08f991

Browse files
committed
Add algolia indexes
1 parent 0b8d32e commit c08f991

File tree

2 files changed

+41
-8
lines changed

2 files changed

+41
-8
lines changed

.github/workflows/ build.yml

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ env:
1616
INSTANCE: Writerside/litecommands
1717
ARTIFACT: webHelpLITECOMMANDS2-all.zip
1818
# Docker image version
19-
DOCKER_VERSION: 232.10275
19+
DOCKER_VERSION: 241.15989
20+
ALGOLIA_ARTIFACT: 'algolia-indexes-LITECOMMANDS.zip'
21+
ALGOLIA_APP_NAME: 'AA5N7A7U42'
22+
ALGOLIA_INDEX_NAME: 'litecommands'
23+
ALGOLIA_KEY: '${{ secrets.ALGOLIA_KEY }}'
24+
CONFIG_JSON_PRODUCT: 'LITECOMMANDS'
25+
CONFIG_JSON_VERSION: '2.0'
2026

2127
jobs:
2228
build:
@@ -25,6 +31,8 @@ jobs:
2531
steps:
2632
- name: Checkout repository
2733
uses: actions/checkout@v3
34+
with:
35+
fetch-depth: 0
2836

2937
- name: Build Writerside docs using Docker
3038
uses: JetBrains/writerside-github-action@v4
@@ -34,7 +42,7 @@ jobs:
3442
docker-version: ${{ env.DOCKER_VERSION }}
3543

3644
- name: Upload artifact
37-
uses: actions/upload-artifact@v3
45+
uses: actions/upload-artifact@v4
3846
with:
3947
name: docs
4048
path: |
@@ -51,21 +59,43 @@ jobs:
5159

5260
steps:
5361
- name: Download artifact
54-
uses: actions/download-artifact@v3
62+
uses: actions/download-artifact@v4
5563
with:
5664
name: docs
5765

5866
- name: Unzip artifact
5967
run: unzip -O UTF-8 -qq ${{ env.ARTIFACT }} -d dir
6068

6169
- name: Setup Pages
62-
uses: actions/configure-pages@v2
70+
uses: actions/configure-pages@v4
6371

64-
- name: Upload artifact
65-
uses: actions/upload-pages-artifact@v1
72+
- name: Package and upload Pages artifact
73+
uses: actions/upload-pages-artifact@v3
6674
with:
6775
path: dir
6876

6977
- name: Deploy to GitHub Pages
7078
id: deployment
71-
uses: actions/deploy-pages@v1
79+
uses: actions/deploy-pages@v4
80+
81+
publish-indexes:
82+
needs: [ build, deploy ]
83+
runs-on: ubuntu-latest
84+
container:
85+
image: registry.jetbrains.team/p/writerside/builder/algolia-publisher:2.0.32-3
86+
steps:
87+
- name: Download artifact
88+
uses: actions/download-artifact@v4
89+
with:
90+
name: docs
91+
- name: Unzip artifact
92+
run: |
93+
unzip -O UTF-8 -qq '${{ env.ALGOLIA_ARTIFACT }}' -d algolia-indexes
94+
env algolia-key='${{env.ALGOLIA_KEY}}' java -jar /opt/builder/help-publication-agent.jar \
95+
update-index \
96+
--application-name '${{env.ALGOLIA_APP_NAME}}' \
97+
--index-name '${{env.ALGOLIA_INDEX_NAME}}' \
98+
--product '${{env.CONFIG_JSON_PRODUCT}}' \
99+
--version '${{env.CONFIG_JSON_VERSION}}' \
100+
--index-directory algolia-indexes/ \
101+
2>&1 | tee algolia-update-index-log.txt

Writerside/cfg/buildprofiles.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
<buildprofiles xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/build-profiles.xsd"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
44

5-
<build-profile instance="hi">
5+
<build-profile instance="litecommands">
66
<variables>
77
<noindex-content>true</noindex-content>
88
<primary-color>purple</primary-color>
99
<color-preset>purple</color-preset>
10+
<algolia-id>AA5N7A7U42</algolia-id>
11+
<algolia-index>litecommands</algolia-index>
12+
<algolia-api-key>b36a06ddbc4e036fb9dffc0ed94e22ac</algolia-api-key>
1013
</variables>
1114
</build-profile>
1215

0 commit comments

Comments
 (0)