1
- #
2
- # Publish to GitHub Pages
3
- # Initially based on the instructions in Antora Docs
4
- # https://docs.antora.org/antora/latest/publish-to-github-pages/
5
- #
6
-
7
1
name : Publish Website
8
2
9
3
on :
10
- # Cronjob for publishing
11
4
schedule :
12
- - cron : ' 0 */8 * * *'
13
- # When pushes are made to the main branch
5
+ - cron : ' 0 */8 * * *'
14
6
push :
15
7
branches : [ main ]
16
- # Also manually from actions
17
8
workflow_dispatch :
18
-
9
+
19
10
concurrency :
20
11
group : github-pages
21
12
cancel-in-progress : false
22
-
23
- # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13
+
14
+ # Permissions for GitHub Pages deployment
24
15
permissions :
25
16
contents : read
26
17
pages : write
27
18
id-token : write
19
+
28
20
jobs :
29
21
build :
30
22
runs-on : ubuntu-latest
@@ -34,38 +26,52 @@ jobs:
34
26
ports :
35
27
- 8000:8000
36
28
options : --health-cmd="curl http://localhost:8000/health || exit 1" --health-interval=10s --health-timeout=5s --health-retries=3
29
+
37
30
environment :
38
31
name : github-pages
39
32
url : ${{ steps.deployment.outputs.page_url }}
33
+
40
34
steps :
41
35
- name : Checkout repository
42
36
uses : actions/checkout@v4
37
+
43
38
- name : Configure Pages
44
39
uses : actions/configure-pages@v3
40
+
45
41
- name : Install Node.js
46
42
uses : actions/setup-node@v4
47
43
with :
48
44
node-version : ' 18'
49
- - name : Setup java
45
+
46
+ - name : Setup Java
50
47
uses : actions/setup-java@v4
51
48
with :
52
49
distribution : ' temurin'
53
50
java-version : ' 17'
51
+
54
52
- name : Install Antora
55
- run : npm i antora
53
+ run : npm install -g @antora/cli @antora/site-generator
54
+
56
55
- name : Setup Ruby
57
56
uses : ruby/setup-ruby@v1
58
57
with :
59
58
ruby-version : ' 3.3'
60
59
bundler-cache : true
60
+
61
61
- name : Install Graphviz
62
- run : sudo apt update && sudo apt install -y graphviz
62
+ run : sudo apt-get update && sudo apt-get install -y graphviz
63
+
63
64
- name : Generate Site
64
- run : npx antora antora-playbook.yml
65
+ run : antora --fetch antora-playbook.yml
66
+
67
+ - name : Debug build output
68
+ run : ls -R build/site || echo "Site not generated"
69
+
65
70
- name : Upload Artifacts
66
- uses : actions/upload-pages-artifact@v2
71
+ uses : actions/upload-pages-artifact@v3 # Updated to v3 to resolve deprecation issue
67
72
with :
68
73
path : build/site
74
+
69
75
- name : Deploy to GitHub Pages
70
76
id : deployment
71
77
uses : actions/deploy-pages@v2
0 commit comments