Skip to content

Commit 6f4d51f

Browse files
authored
Merge pull request #3 from Gml-Launcher/fix/artifacts-algolia
Update workflows to improve artifact handling and branch config
2 parents faa7eb9 + 4032cfe commit 6f4d51f

File tree

2 files changed

+23
-3
lines changed

2 files changed

+23
-3
lines changed

.github/workflows/build-docker-docs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: Build documentation
22

33
on:
44
push:
5-
branches: ["main"]
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
68
workflow_dispatch:
79

810
env:

.github/workflows/build-docs.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Build documentation
33
on:
44
push:
55
branches: ["master"]
6+
pull_request:
7+
branches: [ "master" ]
68
workflow_dispatch:
79

810
permissions:
@@ -42,6 +44,7 @@ jobs:
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
@@ -68,8 +75,11 @@ jobs:
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
@@ -82,6 +92,7 @@ jobs:
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

Comments
 (0)