1+ name : Build documentation
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ tags :
8+ - ' *'
9+ workflow_dispatch :
10+
11+ permissions :
12+ id-token : write
13+ pages : write
14+ contents : write
15+ issues : write
16+ packages : write
17+ repository-projects : write
18+
19+ env :
20+ INSTANCE : ' Writerside/n'
21+ ARTIFACT : ' webHelpN2-all.zip'
22+ DOCKER_VERSION : ' 233.14938'
23+
24+ jobs :
25+ build :
26+ runs-on : ubuntu-latest
27+ steps :
28+ - name : Checkout repository
29+ uses : actions/checkout@v4
30+
31+ - name : Build docs using Writerside Docker builder
32+ uses : JetBrains/writerside-github-action@v4
33+ with :
34+ instance : ${{ env.INSTANCE }}
35+ artifact : ${{ env.ARTIFACT }}
36+ docker-version : ${{ env.DOCKER_VERSION }}
37+
38+ - name : Save artifact with build results
39+ uses : actions/upload-artifact@v4
40+ with :
41+ name : docs
42+ path : |
43+ artifacts/${{ env.ARTIFACT }}
44+ artifacts/report.json
45+ retention-days : 7
46+
47+ test :
48+ needs : build
49+ runs-on : ubuntu-latest
50+ steps :
51+ - name : Download artifacts
52+ uses : actions/download-artifact@v4
53+ with :
54+ name : docs
55+ path : artifacts
56+
57+ - name : Test documentation
58+ uses : JetBrains/writerside-checker-action@v1
59+ with :
60+ instance : ${{ env.INSTANCE }}
61+
62+ deploy :
63+ needs : [ build, test ]
64+ runs-on : ubuntu-latest
65+ steps :
66+ - name : Download artifacts
67+ uses : actions/download-artifact@v4
68+ with :
69+ name : docs
70+
71+ - name : Unzip artifact
72+ run : unzip -O UTF-8 -qq '${{ env.ARTIFACT }}' -d notesDir
73+
74+ - name : 🚀 Deploy notes
75+ uses : JamesIves/github-pages-deploy-action@v4.5.0
76+ with :
77+ branch : main
78+ folder : notesDir
79+ target-folder : notes
80+ clean : true
81+ commit-message : ' Deployed notes!'
82+
83+ # - name: Setup Pages
84+ # uses: actions/configure-pages@v4
85+ #
86+ # - name: Package and upload Pages artifact
87+ # uses: actions/upload-pages-artifact@v3
88+ # with:
89+ # path: dir
90+ #
91+ # - name: Deploy to GitHub Pages
92+ # id: deployment
93+ # uses: actions/deploy-pages@v4
0 commit comments