17
17
# Replace HI with the ID of the instance in capital letters
18
18
ARTIFACT : webHelpTL2-all.zip
19
19
# Writerside docker image version
20
- DOCKER_VERSION : 241.18775
20
+ DOCKER_VERSION : 242.21870
21
+ ALGOLIA_ARTIFACT : ' algolia-indexes-HI.zip'
22
+ ALGOLIA_APP_NAME : ' CZXH99BXN1'
23
+ ALGOLIA_INDEX_NAME : ' Writerside'
24
+ ALGOLIA_KEY : ' ${{ secrets.ALGOLIA_KEY }}'
25
+ CONFIG_JSON_PRODUCT : ' HI'
26
+ CONFIG_JSON_VERSION : ' 1.0'
21
27
22
28
jobs :
23
29
build :
@@ -28,37 +34,31 @@ jobs:
28
34
uses : actions/checkout@v4
29
35
with :
30
36
fetch-depth : 0
31
-
32
37
- name : Build Docs
33
38
uses : JetBrains/writerside-github-action@v4
34
39
with :
35
40
instance : ${{ env.INSTANCE }}
36
41
artifact : ${{ env.ARTIFACT }}
37
42
docker-version : ${{ env.DOCKER_VERSION }}
38
-
39
43
- name : Upload Documentation
40
44
uses : actions/upload-artifact@v4
41
45
with :
42
46
name : docs
43
47
path : |
44
48
artifacts/${{ env.ARTIFACT }}
45
49
artifacts/report.json
50
+ artifacts/${{ env.ALGOLIA_ARTIFACT }}
46
51
retention-days : 7
47
52
48
- # Add the job below and artifacts/report.json on Upload documentation step
49
- # above if you want to fail the build when documentation contains errors.
50
53
test :
51
- # Requires build job results
52
54
needs : build
53
55
runs-on : ubuntu-latest
54
-
55
56
steps :
56
57
- name : Download Artifacts
57
58
uses : actions/download-artifact@v4
58
59
with :
59
60
name : docs
60
61
path : artifacts
61
-
62
62
- name : Test Documentation
63
63
uses : JetBrains/writerside-checker-action@v1
64
64
with :
@@ -68,26 +68,43 @@ jobs:
68
68
environment :
69
69
name : github-pages
70
70
url : ${{ steps.deployment.outputs.page_url }}
71
- # Requires the build job results
72
71
needs : test
73
72
runs-on : ubuntu-latest
74
73
steps :
75
74
- name : Download Artifact
76
75
uses : actions/download-artifact@v4
77
76
with :
78
77
name : docs
79
-
80
78
- name : Unzip Artifact
81
79
run : unzip -O UTF-8 -qq ${{ env.ARTIFACT }} -d dir
82
-
83
80
- name : Setup Pages
84
81
uses : actions/configure-pages@v4
85
-
86
82
- name : Upload Artifact
87
83
uses : actions/upload-pages-artifact@v3
88
84
with :
89
85
path : dir
90
-
91
86
- name : Deploy to GitHub Pages
92
87
id : deployment
93
88
uses : actions/deploy-pages@v4
89
+
90
+ publish-indexes :
91
+ needs : [build, test, deploy]
92
+ runs-on : ubuntu-latest
93
+ container :
94
+ image : registry.jetbrains.team/p/writerside/builder/algolia-publisher:2.0.32-3
95
+ steps :
96
+ - name : Download artifact
97
+ uses : actions/download-artifact@v4
98
+ with :
99
+ name : docs
100
+ - name : Unzip artifact
101
+ run : |
102
+ unzip -O UTF-8 -qq '${{ env.ALGOLIA_ARTIFACT }}' -d algolia-indexes
103
+ env algolia-key='${{env.ALGOLIA_KEY}}' java -jar /opt/builder/help-publication-agent.jar \
104
+ update-index \
105
+ --application-name '${{env.ALGOLIA_APP_NAME}}' \
106
+ --index-name '${{env.ALGOLIA_INDEX_NAME}}' \
107
+ --product '${{env.CONFIG_JSON_PRODUCT}}' \
108
+ --version '${{env.CONFIG_JSON_VERSION}}' \
109
+ --index-directory algolia-indexes/ \
110
+ 2>&1 | tee algolia-update-index-log.txt
0 commit comments