Skip to content

Commit 720425c

Browse files
Update publish.yml
1 parent 0b5a573 commit 720425c

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

.github/workflows/publish.yml

+24-18
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,22 @@
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-
71
name: Publish Website
82

93
on:
10-
# Cronjob for publishing
114
schedule:
12-
- cron: '0 */8 * * *'
13-
# When pushes are made to the main branch
5+
- cron: '0 */8 * * *'
146
push:
157
branches: [ main ]
16-
# Also manually from actions
178
workflow_dispatch:
18-
9+
1910
concurrency:
2011
group: github-pages
2112
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
2415
permissions:
2516
contents: read
2617
pages: write
2718
id-token: write
19+
2820
jobs:
2921
build:
3022
runs-on: ubuntu-latest
@@ -34,38 +26,52 @@ jobs:
3426
ports:
3527
- 8000:8000
3628
options: --health-cmd="curl http://localhost:8000/health || exit 1" --health-interval=10s --health-timeout=5s --health-retries=3
29+
3730
environment:
3831
name: github-pages
3932
url: ${{ steps.deployment.outputs.page_url }}
33+
4034
steps:
4135
- name: Checkout repository
4236
uses: actions/checkout@v4
37+
4338
- name: Configure Pages
4439
uses: actions/configure-pages@v3
40+
4541
- name: Install Node.js
4642
uses: actions/setup-node@v4
4743
with:
4844
node-version: '18'
49-
- name: Setup java
45+
46+
- name: Setup Java
5047
uses: actions/setup-java@v4
5148
with:
5249
distribution: 'temurin'
5350
java-version: '17'
51+
5452
- name: Install Antora
55-
run: npm i antora
53+
run: npm install -g @antora/cli @antora/site-generator
54+
5655
- name: Setup Ruby
5756
uses: ruby/setup-ruby@v1
5857
with:
5958
ruby-version: '3.3'
6059
bundler-cache: true
60+
6161
- 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+
6364
- 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+
6570
- name: Upload Artifacts
66-
uses: actions/upload-pages-artifact@v2
71+
uses: actions/upload-pages-artifact@v3 # Updated to v3 to resolve deprecation issue
6772
with:
6873
path: build/site
74+
6975
- name: Deploy to GitHub Pages
7076
id: deployment
7177
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)