Skip to content

Commit ab116f5

Browse files
authored
Merge pull request #40 from gregPerlinLi/dev
CI/CD Enhancements and Database Support for CertVault
2 parents 6ad788c + 984cf32 commit ab116f5

File tree

63 files changed

+973
-357
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+973
-357
lines changed

.github/workflows/backend-ci.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ jobs:
2525
attestations: write
2626
id-token: write
2727

28+
services:
29+
redis:
30+
image: redis
31+
ports:
32+
- 6379:6379
33+
options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
34+
2835
steps:
2936
# 检出代码
3037
- name: Checkout code
@@ -102,6 +109,12 @@ jobs:
102109
tags: ${{ steps.meta.outputs.tags }}
103110
labels: ${{ steps.meta.outputs.labels }}
104111

112+
- name: Generate OpenAPI Documentation
113+
run: | # 启动应用并导出 YAML 格式文档
114+
java -jar server/target/*.jar --spring.profiles.active=ci &
115+
sleep 20
116+
curl http://localhost:1888/api/docs.yaml > openapi.yaml
117+
105118
- name: Set up environment variable
106119
run: echo "VERSION=${{ env.VERSION }}" > version.env
107120

@@ -111,6 +124,12 @@ jobs:
111124
name: version
112125
path: version.env
113126

127+
- name: Upload API Doc Artifact
128+
uses: actions/upload-artifact@v4
129+
with:
130+
name: openapi-doc
131+
path: openapi.yaml
132+
114133
deploy-helm:
115134
runs-on: ubuntu-latest
116135
needs: build-backend
@@ -166,3 +185,42 @@ jobs:
166185
git add .
167186
git commit -m "${{ github.event.head_commit.message }}" || echo "No changes to commit"
168187
git push origin main
188+
189+
publish-api-doc:
190+
runs-on: ubuntu-latest
191+
needs: build-backend
192+
permissions:
193+
contents: write
194+
steps:
195+
# 下载生成的 OpenAPI 文档
196+
- name: Download OpenAPI artifact
197+
uses: actions/download-artifact@v4
198+
with:
199+
name: openapi-doc
200+
path: .
201+
202+
# 检出 CertVaultAPIDoc 仓库
203+
- name: Checkout CertVaultAPIDoc repo
204+
uses: actions/checkout@v4
205+
with:
206+
repository: gregPerlinLi/certvault-api-doc
207+
token: ${{ secrets.CERT_VAULT_API_DOC_TOKEN }}
208+
path: certvault-api-doc
209+
ref: main
210+
211+
# 替换并提交 OpenAPI 文档
212+
- name: Update OpenAPI file
213+
run: |
214+
cp ./openapi.yaml certvault-api-doc/
215+
cd certvault-api-doc
216+
git config --global user.name "GitHub Actions"
217+
git config --global user.email "actions@github.com"
218+
git add openapi.yaml
219+
git commit -m "Update OpenAPI documentation" || echo "No changes to commit"
220+
cd ..
221+
222+
# 推送变更到 CertVaultAPIDoc
223+
- name: Push changes to CertVaultAPIDoc
224+
run: |
225+
cd certvault-api-doc
226+
git push origin main

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,15 @@ docker compose -f docker-compose-with-postgres-redis.yml up -d
113113
- [How to deployment](docs/Deployment.md)
114114
- How to use
115115

116+
## ⚙️ API Documentation
117+
118+
[CertVault API Documentation](https://gregperlinli.github.io/certvault-api-doc/)
119+
116120
## 🧰 Related Projects
117121

118122
- [CertVault CLI](https://github.com/gregPerlinLi/CertVaultCLI): A CLI tool for CertVault Platform
119123
- [CertVault Charts](https://github.com/gregPerlinLi/certvault-charts): Helm Charts for CertVault Platform
124+
- [CertVault API Docs](https://github.com/gregPerlinLi/certvault-api-doc): API documentation for CertVault Platform
120125

121126
## 📊 Statistics
122127

README_CN.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ docker compose -f docker-compose-with-postgres-redis.yml up -d
115115
- [如何部署](docs/Deployment_CN.md)
116116
- 如何使用
117117

118+
## ⚙️ API 文档
119+
120+
[CertVault API 文档(英文)](https://gregperlinli.github.io/certvault-api-doc/)
121+
118122
## 🧰 相关项目
119123

120124
- [CertVault CLI](https://github.com/gregPerlinLi/CertVaultCLI): CertVault 的命令行工具

frontend/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"lodash": "^4.17.21",
1717
"primeicons": "^7.0.0",
1818
"primevue": "^4.3.3",
19-
"tailwindcss": "^4.1.4",
19+
"tailwindcss": "^4.1.5",
2020
"tailwindcss-primeui": "^0.5.1",
2121
"valibot": "^1.0.0",
2222
"vue": "^3.5.13",
@@ -25,7 +25,7 @@
2525
"devDependencies": {
2626
"@primeuix/themes": "^1.0.3",
2727
"@primevue/auto-import-resolver": "^4.3.3",
28-
"@tailwindcss/vite": "^4.1.4",
28+
"@tailwindcss/vite": "^4.1.5",
2929
"@types/lodash": "^4.17.16",
3030
"@vitejs/plugin-vue": "^5.2.3",
3131
"@vue/tsconfig": "^0.7.0",
@@ -34,7 +34,7 @@
3434
"typescript": "~5.8.3",
3535
"unplugin-auto-import": "^19.1.2",
3636
"unplugin-vue-components": "^28.5.0",
37-
"vite": "^6.3.3",
37+
"vite": "^6.3.4",
3838
"vite-tsconfig-paths": "^5.1.4",
3939
"vitest": "^3.1.2",
4040
"vue-tsc": "^2.2.10"

0 commit comments

Comments
 (0)