Skip to content
This repository was archived by the owner on Dec 4, 2025. It is now read-only.

Commit 46213dd

Browse files
committed
ci: 👷 Update PR CI GitHub Actions workflow
1 parent e2eb62b commit 46213dd

2 files changed

Lines changed: 225 additions & 45 deletions

File tree

.github/workflows/build-and-install-plugin.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.
Lines changed: 225 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
name: Build and Run Example Project
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout Plugin Repository
14+
uses: actions/checkout@v4
15+
16+
- name: Set up JDK 11
17+
uses: actions/setup-java@v4
18+
with:
19+
java-version: '11'
20+
distribution: 'temurin'
21+
22+
- name: Build and Install Plugin
23+
run: mvn install
24+
25+
- name: Upload Plugin Artifact
26+
id: upload-artifact
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: smart-doc-maven-jar
30+
path: ~/.m2/repository/com/ly/smart-doc
31+
if-no-files-found: error
32+
33+
gen-rest-api-doc:
34+
needs: build
35+
runs-on: ubuntu-latest
36+
concurrency:
37+
group: generate-rest-api-doc
38+
cancel-in-progress: true
39+
40+
steps:
41+
- name: Checkout Example Project
42+
uses: actions/checkout@v4
43+
with:
44+
repository: smart-doc-group/smart-doc-example-cn
45+
token: ${{ secrets.GITHUB_TOKEN }}
46+
47+
- name: Set up JDK 17
48+
uses: actions/setup-java@v4
49+
with:
50+
java-version: '17'
51+
distribution: 'temurin'
52+
53+
- name: Build and Install Example Project
54+
run: mvn -DskipTests=true install
55+
56+
- name: Download Artifact
57+
uses: actions/download-artifact@v4
58+
with:
59+
name: smart-doc-maven-jar
60+
path: ./artifacts
61+
62+
- name: Move Files to Local Maven Repository
63+
run: |
64+
mkdir -p ~/.m2/repository/com/ly/smart-doc
65+
echo "Overwriting target directory with new artifacts:"
66+
rsync -av --delete ./artifacts/ ~/.m2/repository/com/ly/smart-doc/
67+
echo "Listing files in target directory:"
68+
ls -lh ~/.m2/repository/com/ly/smart-doc
69+
70+
71+
- name: Generate AsciiDoc Documentation
72+
run: mvn -DskipTests=true smart-doc:adoc
73+
74+
- name: Generate HTML Documentation
75+
run: mvn -DskipTests=true smart-doc:html
76+
77+
- name: Generate JMeter Documentation
78+
run: mvn -DskipTests=true smart-doc:jmeter
79+
80+
- name: Generate Markdown Documentation
81+
run: mvn -DskipTests=true smart-doc:markdown
82+
83+
- name: Generate OpenAPI Documentation
84+
run: mvn -DskipTests=true smart-doc:openapi
85+
86+
- name: Generate Postman Documentation
87+
run: mvn -DskipTests=true smart-doc:postman
88+
89+
- name: Generate Word Documentation
90+
run: mvn -DskipTests=true smart-doc:word
91+
92+
gen-dubbo-api-doc:
93+
needs: build
94+
runs-on: ubuntu-latest
95+
concurrency:
96+
group: generate-dubbo-api-doc
97+
cancel-in-progress: true
98+
99+
steps:
100+
- name: Checkout Example Project
101+
uses: actions/checkout@v4
102+
with:
103+
repository: smart-doc-group/smart-doc-example-cn
104+
token: ${{ secrets.GITHUB_TOKEN }}
105+
106+
- name: Set up JDK 17
107+
uses: actions/setup-java@v4
108+
with:
109+
java-version: '17'
110+
distribution: 'temurin'
111+
112+
- name: Build and Install Example Project
113+
run: mvn -DskipTests=true install
114+
115+
- name: Download Artifact
116+
uses: actions/download-artifact@v4
117+
with:
118+
name: smart-doc-maven-jar
119+
path: ./artifacts
120+
121+
- name: Move Files to Local Maven Repository
122+
run: |
123+
mkdir -p ~/.m2/repository/com/ly/smart-doc
124+
echo "Overwriting target directory with new artifacts:"
125+
rsync -av --delete ./artifacts/ ~/.m2/repository/com/ly/smart-doc/
126+
echo "Listing files in target directory:"
127+
ls -lh ~/.m2/repository/com/ly/smart-doc
128+
129+
130+
- name: Generate RPC AsciiDoc Documentation
131+
run: mvn -DskipTests=true smart-doc:rpc-adoc
132+
133+
- name: Generate RPC HTML Documentation
134+
run: mvn -DskipTests=true smart-doc:rpc-html
135+
136+
- name: Generate RPC Markdown Documentation
137+
run: mvn -DskipTests=true smart-doc:rpc-markdown
138+
139+
gen-javadoc-api-doc:
140+
needs: build
141+
runs-on: ubuntu-latest
142+
concurrency:
143+
group: generate-javadoc-api-doc
144+
cancel-in-progress: true
145+
146+
steps:
147+
- name: Checkout Example Project
148+
uses: actions/checkout@v4
149+
with:
150+
repository: smart-doc-group/smart-doc-example-cn
151+
token: ${{ secrets.GITHUB_TOKEN }}
152+
153+
- name: Set up JDK 17
154+
uses: actions/setup-java@v4
155+
with:
156+
java-version: '17'
157+
distribution: 'temurin'
158+
159+
- name: Build and Install Example Project
160+
run: mvn -DskipTests=true install
161+
162+
- name: Download Artifact
163+
uses: actions/download-artifact@v4
164+
with:
165+
name: smart-doc-maven-jar
166+
path: ./artifacts
167+
168+
- name: Move Files to Local Maven Repository
169+
run: |
170+
mkdir -p ~/.m2/repository/com/ly/smart-doc
171+
echo "Overwriting target directory with new artifacts:"
172+
rsync -av --delete ./artifacts/ ~/.m2/repository/com/ly/smart-doc/
173+
echo "Listing files in target directory:"
174+
ls -lh ~/.m2/repository/com/ly/smart-doc
175+
176+
177+
- name: Generate Javadoc AsciiDoc Documentation
178+
run: mvn -DskipTests=true smart-doc:javadoc-adoc
179+
180+
- name: Generate Javadoc HTML Documentation
181+
run: mvn -DskipTests=true smart-doc:javadoc-html
182+
183+
- name: Generate Javadoc Markdown Documentation
184+
run: mvn -DskipTests=true smart-doc:javadoc-markdown
185+
186+
gen-websocket-api-doc:
187+
needs: build
188+
runs-on: ubuntu-latest
189+
concurrency:
190+
group: generate-websocket-api-doc
191+
cancel-in-progress: true
192+
193+
steps:
194+
- name: Checkout Example Project
195+
uses: actions/checkout@v4
196+
with:
197+
repository: smart-doc-group/smart-doc-example-cn
198+
token: ${{ secrets.GITHUB_TOKEN }}
199+
200+
- name: Set up JDK 17
201+
uses: actions/setup-java@v4
202+
with:
203+
java-version: '17'
204+
distribution: 'temurin'
205+
206+
- name: Build and Install Example Project
207+
run: mvn -DskipTests=true install
208+
209+
- name: Download Artifact
210+
uses: actions/download-artifact@v4
211+
with:
212+
name: smart-doc-maven-jar
213+
path: ./artifacts
214+
215+
- name: Move Files to Local Maven Repository
216+
run: |
217+
mkdir -p ~/.m2/repository/com/ly/smart-doc
218+
echo "Overwriting target directory with new artifacts:"
219+
rsync -av --delete ./artifacts/ ~/.m2/repository/com/ly/smart-doc/
220+
echo "Listing files in target directory:"
221+
ls -lh ~/.m2/repository/com/ly/smart-doc
222+
223+
224+
- name: Generate WebSocket Markdown Documentation
225+
run: mvn -DskipTests=true smart-doc:websocket-markdown

0 commit comments

Comments
 (0)