1+ name : Build and Deploy Docs
2+
3+ on :
4+ workflow_dispatch :
5+
6+ permissions :
7+ id-token : write
8+ pages : write
9+
10+ env :
11+ INSTANCE : Writerside/hi
12+ ARTIFACT : webHelpHI2-all.zip
13+ DOCS_FOLDER : ./docs
14+
15+ jobs :
16+ build :
17+ runs-on : ubuntu-latest
18+
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v4
22+
23+ - name : Build Writerside docs using Docker
24+ uses : JetBrains/writerside-github-action@v4
25+ with :
26+ instance : ${{ env.INSTANCE }}
27+ artifact : ${{ env.ARTIFACT }}
28+ location : ${{ env.DOCS_FOLDER }}
29+
30+ - name : Upload documentation
31+ uses : actions/upload-artifact@v4
32+ with :
33+ name : docs
34+ path : |
35+ artifacts/${{ env.ARTIFACT }}
36+ artifacts/report.json
37+ retention-days : 7
38+
39+ test :
40+ needs : build
41+ runs-on : ubuntu-latest
42+
43+ steps :
44+ - name : Download artifacts
45+ uses : actions/download-artifact@v4
46+ with :
47+ name : docs
48+ path : artifacts
49+
50+ - name : Test documentation
51+ uses : JetBrains/writerside-checker-action@v1
52+ with :
53+ instance : ${{ env.INSTANCE }}
54+
55+ deploy :
56+ environment :
57+ name : github-pages
58+ url : ${{ steps.deployment.outputs.page_url }}
59+ needs : test
60+ runs-on : ubuntu-latest
61+ steps :
62+ - name : Download artifact
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@v5
72+
73+ - name : Upload 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
0 commit comments