Skip to content

Commit b58a343

Browse files
committed
Set up documentation publishing
1 parent 5cd57a7 commit b58a343

File tree

2 files changed

+48
-3
lines changed

2 files changed

+48
-3
lines changed

.github/workflows/build-docs.yml

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
branches: ["main"]
66
workflow_dispatch:
77

8+
permissions:
9+
id-token: write
10+
pages: write
11+
812
env:
913
INSTANCE: 'Writerside/hi'
1014
ARTIFACT: 'webHelpHI2-all.zip'
@@ -32,4 +36,45 @@ jobs:
3236
name: docs
3337
path: |
3438
artifacts/${{ env.ARTIFACT }}
35-
retention-days: 7
39+
artifacts/report.json
40+
retention-days: 7
41+
test:
42+
needs: build
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Download artifacts
46+
uses: actions/download-artifact@v4
47+
with:
48+
name: docs
49+
path: artifacts
50+
51+
- name: Test documentation
52+
uses: JetBrains/writerside-checker-action@v1
53+
with:
54+
instance: ${{ env.INSTANCE }}
55+
deploy:
56+
environment:
57+
name: github-pages
58+
url: ${{ steps.deployment.outputs.page_url }}
59+
needs: [build, test]
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Download artifacts
63+
uses: actions/download-artifact@v4
64+
with:
65+
name: docs
66+
67+
- name: Unzip artifact
68+
run: unzip -O UTF-8 -qq '${{ env.ARTIFACT }}' -d dir
69+
70+
- name: Setup Pages
71+
uses: actions/configure-pages@v4
72+
73+
- name: Package and upload Pages artifact
74+
uses: actions/upload-pages-artifact@v3
75+
with:
76+
path: dir
77+
78+
- name: Deploy to GitHub Pages
79+
id: deployment
80+
uses: actions/deploy-pages@v4

Writerside/writerside.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<!DOCTYPE ihp SYSTEM "https://resources.jetbrains.com/writerside/1.0/ihp.dtd">
33

44
<ihp version="2.0">
5-
<topics dir="topics" web-path="topics"/>
6-
<images dir="images" web-path="images"/>
5+
<topics dir="topics"/>
6+
<images dir="images" web-path="analysis-api"/>
77
<categories src="c.list"/>
88
<vars src="v.list"/>
99
<instance src="hi.tree"/>

0 commit comments

Comments
 (0)