@@ -6,12 +6,10 @@ name: Generate MicroProfile Tutorial
66on :
77 # Allows manual triggering of the workflow from the GitHub Actions tab
88 workflow_dispatch :
9-
109 # Automatically runs when code is pushed to the main branch
1110 push :
1211 branches :
1312 - main
14-
1513 # Runs on pull requests to validate the build (but doesn't deploy)
1614 pull_request :
1715 branches :
@@ -29,13 +27,13 @@ jobs:
2927 validate-build :
3028 # Only run this job on pull requests
3129 if : github.event_name == 'pull_request'
32-
30+
3331 runs-on : ubuntu-latest
34-
32+
3533 # Minimal permissions needed for PR validation
3634 permissions :
3735 contents : read # Required to read repository contents
38-
36+
3937 steps :
4038 # Checkout the repository source code
4139 - name : Checkout Repository
6563 # Generate the documentation site to validate it builds correctly
6664 - name : Validate Site Generation
6765 run : npx antora --fetch --stacktrace antora-assembler.yml
68-
66+
6967 # Verify the build output exists
7068 - name : Verify Build Output
7169 run : |
9290 # Only deploy to Pages on pushes to main branch, not on PRs
9391 # This prevents deploying from pull request builds
9492 if : github.event_name != 'pull_request'
95-
93+
9694 # Use GitHub Pages environment for deployment tracking and protection
9795 environment :
9896 name : github-pages
@@ -105,7 +103,7 @@ jobs:
105103 id-token : write # Required for OIDC authentication to GitHub Pages
106104 contents : read # Required to read repository contents and checkout code
107105 pages : write # Required to deploy artifacts to GitHub Pages
108-
106+
109107 steps :
110108 # Checkout the repository source code
111109 - name : Checkout Repository
@@ -135,7 +133,7 @@ jobs:
135133 # Verify that Antora was installed correctly (useful for debugging)
136134 - name : Verify Antora Installation
137135 run : npm list @antora/cli @antora/site-generator-default || echo "Antora packages are not installed."
138-
136+
139137 # Clean previous build directory to ensure fresh generation
140138 - name : Clean previous build directory
141139 run : |
@@ -252,7 +250,7 @@ jobs:
252250 uses : actions/upload-pages-artifact@v3
253251 with :
254252 path : ./build/site # Antora's default output directory
255-
253+
256254 # Deploy the uploaded artifact to GitHub Pages
257255 - name : Deploy to GitHub Pages
258256 id : deployment
0 commit comments