@@ -3,6 +3,8 @@ name: Build documentation
33on :
44 push :
55 branches : ["master"]
6+ pull_request :
7+ branches : [ "master" ]
68 workflow_dispatch :
79
810permissions :
4244 artifacts/${{ env.ARTIFACT }}
4345 artifacts/report.json
4446 retention-days : 7
47+
4548 test :
4649 needs : build
4750 runs-on : ubuntu-latest
@@ -52,10 +55,14 @@ jobs:
5255 name : docs
5356 path : artifacts
5457
58+ - name : List artifacts directory (test step)
59+ run : ls -l artifacts
60+
5561 - name : Test documentation
5662 uses : JetBrains/writerside-checker-action@v1
5763 with :
5864 instance : ${{ env.INSTANCE }}
65+
5966 deploy :
6067 environment :
6168 name : github-pages
6875 with :
6976 name : docs
7077
78+ - name : List artifacts directory (deploy step)
79+ run : ls -l artifacts
80+
7181 - name : Unzip artifact
72- run : unzip -O UTF-8 -qq ' ${{ env.ARTIFACT }}' -d dir
82+ run : unzip -O UTF-8 -qq "artifacts/ ${{ env.ARTIFACT }}" -d dir
7383
7484 - name : Setup Pages
7585 uses : actions/configure-pages@v4
8292 - name : Deploy to GitHub Pages
8393 id : deployment
8494 uses : actions/deploy-pages@v4
95+
8596 publish-indexes :
8697 needs : [build, test, deploy]
8798 runs-on : ubuntu-latest
@@ -92,9 +103,16 @@ jobs:
92103 uses : actions/download-artifact@v4
93104 with :
94105 name : docs
106+
107+ - name : List artifacts directory (publish step)
108+ run : ls -l artifacts
109+
95110 - name : Unzip artifact
96111 run : |
97- unzip -O UTF-8 -qq 'artifacts/${{ env.ALGOLIA_ARTIFACT }}' -d algolia-indexes
112+ unzip -O UTF-8 -qq "artifacts/${{ env.ALGOLIA_ARTIFACT }}" -d algolia-indexes
113+
114+ - name : Publish to Algolia Index
115+ run : |
98116 env algolia-key='${{env.ALGOLIA_KEY}}' java -jar /opt/builder/help-publication-agent.jar \
99117 update-index \
100118 --application-name '${{env.ALGOLIA_APP_NAME}}' \
0 commit comments