44 pull_request :
55 branches :
66 - master
7-
7+ paths :
8+ - ' src/**' # Trigger workflow only if files in src directory change
9+ - ' pom.xml' # Trigger workflow only if pom.xml file changes
810jobs :
911 build :
12+ if : ${{ github.event.pull_request.changed_files > 0 }} # Run only if there are file changes
1013 runs-on : ubuntu-latest
1114
1215 steps :
3437 needs : build
3538 runs-on : ubuntu-latest
3639 concurrency :
37- group : generate-rest-api-doc
40+ group : generate-rest-api-doc-${{ github.event.pull_request.number }}
3841 cancel-in-progress : true
3942
4043 steps :
@@ -89,11 +92,17 @@ jobs:
8992 - name : Generate Word Documentation
9093 run : mvn -DskipTests=true smart-doc:word
9194
95+ - name : Upload REST API Documentation
96+ uses : actions/upload-artifact@v4
97+ with :
98+ name : rest-api-docs
99+ path : /home/runner/work/smart-doc/smart-doc/target/doc/
100+
92101 gen-dubbo-api-doc :
93102 needs : build
94103 runs-on : ubuntu-latest
95104 concurrency :
96- group : generate-dubbo-api-doc
105+ group : generate-dubbo-api-doc-${{ github.event.pull_request.number }}
97106 cancel-in-progress : true
98107
99108 steps :
@@ -136,11 +145,17 @@ jobs:
136145 - name : Generate RPC Markdown Documentation
137146 run : mvn -DskipTests=true smart-doc:rpc-markdown
138147
148+ - name : Upload RPC API Documentation
149+ uses : actions/upload-artifact@v4
150+ with :
151+ name : dubbo-api-docs
152+ path : /home/runner/work/smart-doc/smart-doc/target/doc/
153+
139154 gen-javadoc-api-doc :
140155 needs : build
141156 runs-on : ubuntu-latest
142157 concurrency :
143- group : generate-javadoc-api-doc
158+ group : generate-javadoc-api-doc-${{ github.event.pull_request.number }}
144159 cancel-in-progress : true
145160
146161 steps :
@@ -183,11 +198,17 @@ jobs:
183198 - name : Generate Javadoc Markdown Documentation
184199 run : mvn -DskipTests=true smart-doc:javadoc-markdown
185200
201+ - name : Upload Javadoc API Documentation
202+ uses : actions/upload-artifact@v4
203+ with :
204+ name : javadoc-api-docs
205+ path : /home/runner/work/smart-doc/smart-doc/target/doc/
206+
186207 gen-websocket-api-doc :
187208 needs : build
188209 runs-on : ubuntu-latest
189210 concurrency :
190- group : generate-websocket-api-doc
211+ group : generate-websocket-api-doc-${{ github.event.pull_request.number }}
191212 cancel-in-progress : true
192213
193214 steps :
@@ -222,4 +243,11 @@ jobs:
222243
223244
224245 - name : Generate WebSocket Markdown Documentation
225- run : mvn -DskipTests=true smart-doc:websocket-markdown
246+ run : mvn -DskipTests=true smart-doc:websocket-markdown
247+
248+
249+ - name : Upload WebSocket API Documentation
250+ uses : actions/upload-artifact@v4
251+ with :
252+ name : websocket-api-doc
253+ path : /home/runner/work/smart-doc/smart-doc/target/doc/
0 commit comments