Skip to content

Commit f4a216e

Browse files
authored
Create pages-antora.yml
1 parent 5020ff7 commit f4a216e

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/pages-antora.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Generate MicroProfile Tutorial
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Or your default branch
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write # Required for authentication
13+
contents: read # Required to read repository contents
14+
pages: write # Required to deploy to GitHub Pages
15+
steps:
16+
- name: Checkout Repository
17+
uses: actions/checkout@v3
18+
19+
- name: Set up Node.js
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: '18' # Use a compatible Node.js version
23+
24+
- name: Install Antora Locally
25+
run: npm install @antora/cli @antora/site-generator-default
26+
27+
- name: Verify Antora Installation
28+
run: npm list @antora/cli @antora/site-generator-default || echo "Antora packages are not installed."
29+
30+
- name: Generate Site with Antora
31+
run: npx antora --fetch --stacktrace playbook.yml
32+
33+
- name: Setup Pages
34+
uses: actions/configure-pages@v4
35+
36+
- name: Upload Antora Site to GitHub Pages
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: ./build/site # The output directory for Antora
40+
41+
- name: Deploy to GitHub Pages
42+
id: deployment
43+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)