1
+ name : Build documentation
2
+
3
+ on :
4
+ push :
5
+ # To trigger the workflow once you push to the `main` branch
6
+ # Replace `main` with your branch’s name
7
+ branches : ["master"]
8
+ # Specify to run a workflow manually from the Actions tab on GitHub
9
+ workflow_dispatch :
10
+
11
+ permissions :
12
+ id-token : write
13
+ pages : write
14
+
15
+ env :
16
+ # Name of module and id separated by a slash
17
+ INSTANCE : Writerside/xx
18
+ # Replace XX with the ID of the instance in capital letters
19
+ ARTIFACT : webHelpLITECOMMANDS2-all.zip
20
+ # Docker image version
21
+ DOCKER_VERSION : 232.10275
22
+
23
+ jobs :
24
+ build :
25
+ runs-on : ubuntu-latest
26
+
27
+ steps :
28
+ - name : Checkout repository
29
+ uses : actions/checkout@v3
30
+
31
+ - name : Build Writerside docs using Docker
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 : Upload artifact
39
+ uses : actions/upload-artifact@v3
40
+ with :
41
+ name : docs
42
+ path : |
43
+ artifacts/${{ env.ARTIFACT }}
44
+ retention-days : 7
45
+
46
+ deploy :
47
+ environment :
48
+ name : github-pages
49
+ url : ${{ steps.deployment.outputs.page_url }}
50
+ # Requires build job results
51
+ needs : build
52
+ runs-on : ubuntu-latest
53
+
54
+ steps :
55
+ - name : Download artifact
56
+ uses : actions/download-artifact@v3
57
+ with :
58
+ name : docs
59
+
60
+ - name : Unzip artifact
61
+ run : unzip -O UTF-8 -qq ${{ env.ARTIFACT }} -d dir
62
+
63
+ - name : Setup Pages
64
+ uses : actions/configure-pages@v2
65
+
66
+ - name : Upload artifact
67
+ uses : actions/upload-pages-artifact@v1
68
+ with :
69
+ path : dir
70
+
71
+ - name : Deploy to GitHub Pages
72
+ id : deployment
73
+ uses : actions/deploy-pages@v1
0 commit comments