Skip to content

Commit d432083

Browse files
committed
ci: change pipeline and fix building docs
1 parent 6f25049 commit d432083

File tree

3 files changed

+32
-4
lines changed

3 files changed

+32
-4
lines changed

.github/workflows/release_and_changelog.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,35 @@ jobs:
2828
body: ${{ steps.changelog.outputs.changes }}
2929
token: ${{ github.token }}
3030

31+
- name: Update versions file
32+
run: |
33+
echo "{\"mongocamp\": \"${{ github.ref_name }}\"}" > ./docs/versions.json;
34+
git add ./docs/versions.json
35+
3136
- name: Commit CHANGELOG.md
3237
uses: stefanzweifel/git-auto-commit-action@v4
3338
with:
3439
branch: main
3540
commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }}'
36-
file_pattern: CHANGELOG.md
41+
file_pattern: CHANGELOG.md
42+
43+
- name: Set up JDK
44+
uses: coursier/setup-action@v1
45+
with:
46+
jvm: graalvm-java17:22.3.3
47+
apps: sbt scala scalac
48+
49+
- name: Install pnpm
50+
uses: pnpm/[email protected]
51+
with:
52+
version: 6.0.2
53+
54+
- name: Build and deploy Docu
55+
env:
56+
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
GITHUB_USER: ${{ github.actor }}
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
run: |
60+
git config --global user.email "[email protected]"
61+
git config --global user.name "MongoCamp CI"
62+
sh ./deploy_ghpages.sh

docs/.vitepress/config.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import Unocss from 'unocss/vite'
22
import {defineConfig} from 'vitepress'
3-
import {version} from '../../package.json'
4-
import {SearchPlugin} from 'vitepress-plugin-search'
3+
import fs from 'fs'
54

65
export default defineConfig({
76
lang: 'en-US',
@@ -50,6 +49,8 @@ export default defineConfig({
5049
})
5150

5251
function nav() {
52+
var versionInfos = JSON.parse(fs.readFileSync('docs/versions.json', 'utf-8'))
53+
5354
return [
5455
{
5556
text: 'Documentation',
@@ -63,7 +64,7 @@ function nav() {
6364
]
6465
},
6566
{
66-
text: version,
67+
text: versionInfos.mongocamp,
6768
items: [
6869
{
6970
text: 'Changelog',

docs/versions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"mongocamp": "2.6.6"}

0 commit comments

Comments
 (0)