Skip to content

Commit b729117

Browse files
Copilottwisti-dev
andauthored
fix: add contentBoost workaround step and re-enable publish-indexes job
Agent-Logs-Url: https://github.com/SLNE-Development/community-server-docs/sessions/b4b01f39-7035-492e-947e-4f00bd335010 Co-authored-by: twisti-dev <76837088+twisti-dev@users.noreply.github.com>
1 parent d5fc089 commit b729117

1 file changed

Lines changed: 38 additions & 31 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -104,34 +104,41 @@ jobs:
104104
#wranglerVersion: 3.101.0
105105

106106
# see: https://youtrack.jetbrains.com/issue/WRS-7233/Algolia-publisher-2.0.32-3-fails-with-UnrecognizedPropertyException-for-contentBoost-field-generated-by-Writerside-builder
107-
# publish-indexes:
108-
# needs: [ build, test, deploy ]
109-
# runs-on: ubuntu-latest
110-
# container:
111-
# image: registry.jetbrains.team/p/writerside/builder/algolia-publisher:latest
112-
#
113-
# steps:
114-
# - name: Download artifact
115-
# uses: actions/download-artifact@v4
116-
# with:
117-
# name: docs
118-
# path: artifacts
119-
#
120-
# - name: Unzip Algolia artifact
121-
# run: unzip -O UTF-8 -qq "artifacts/${{ needs.build.outputs.algolia_artifact }}" -d algolia-indexes
122-
#
123-
# - name: Update Algolia Index
124-
# run: |
125-
# if [ -z "${{ secrets.ALGOLIA_KEY }}" ]; then
126-
# echo "ALGOLIA_KEY secret is not set in GitHub Secrets"
127-
# exit 1
128-
# else
129-
# env "algolia-key=${{ secrets.ALGOLIA_KEY }}" java -jar /opt/builder/help-publication-agent.jar \
130-
# update-index \
131-
# --application-name ${{ env.ALGOLIA_APP_NAME }} \
132-
# --index-name ${{ env.ALGOLIA_INDEX_NAME }} \
133-
# --product ${{ env.CONFIG_JSON_PRODUCT }} \
134-
# --version ${{ env.CONFIG_JSON_VERSION }} \
135-
# --index-directory algolia-indexes/ \
136-
# 2>&1 | tee algolia-update-index-log.txt
137-
# fi
107+
publish-indexes:
108+
needs: [ build, test, deploy ]
109+
runs-on: ubuntu-latest
110+
container:
111+
image: registry.jetbrains.team/p/writerside/builder/algolia-publisher:latest
112+
113+
steps:
114+
- name: Download artifact
115+
uses: actions/download-artifact@v4
116+
with:
117+
name: docs
118+
path: artifacts
119+
120+
- name: Unzip Algolia artifact
121+
run: unzip -O UTF-8 -qq "artifacts/${{ needs.build.outputs.algolia_artifact }}" -d algolia-indexes
122+
123+
- name: Remove contentBoost field from index files
124+
run: |
125+
cd algolia-indexes
126+
for f in *.json; do
127+
sed -i 's/"contentBoost":[0-9]*,//g' "$f"
128+
done
129+
130+
- name: Update Algolia Index
131+
run: |
132+
if [ -z "${{ secrets.ALGOLIA_KEY }}" ]; then
133+
echo "ALGOLIA_KEY secret is not set in GitHub Secrets"
134+
exit 1
135+
else
136+
env "algolia-key=${{ secrets.ALGOLIA_KEY }}" java -jar /opt/builder/help-publication-agent.jar \
137+
update-index \
138+
--application-name ${{ env.ALGOLIA_APP_NAME }} \
139+
--index-name ${{ env.ALGOLIA_INDEX_NAME }} \
140+
--product ${{ env.CONFIG_JSON_PRODUCT }} \
141+
--version ${{ env.CONFIG_JSON_VERSION }} \
142+
--index-directory algolia-indexes/ \
143+
2>&1 | tee algolia-update-index-log.txt
144+
fi

0 commit comments

Comments
 (0)