File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed
Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 77 paths :
88 - ' docs/**'
99 - ' mkdocs.yml'
10+ release :
11+ types :
12+ - published
1013 workflow_dispatch :
1114
1215permissions :
@@ -17,11 +20,31 @@ jobs:
1720 runs-on : ubuntu-latest
1821 steps :
1922 - uses : actions/checkout@v4
23+ with :
24+ fetch-depth : 0
2025
2126 - uses : actions/setup-python@v5
2227 with :
2328 python-version : 3.x
2429
25- - run : pip install mkdocs-material
30+ - run : pip install mkdocs-material mike
31+
32+ - name : Configure git user
33+ run : |
34+ git config user.name "github-actions[bot]"
35+ git config user.email "github-actions[bot]@users.noreply.github.com"
36+
37+ - name : Deploy dev docs (push to main)
38+ if : github.event_name == 'push' || github.event_name == 'workflow_dispatch'
39+ run : |
40+ PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version --quiet -DforceStdout)
41+ mike deploy --push --update-aliases "${PROJECT_VERSION}" dev
42+ # mike deploy --push --update-aliases dev
43+ # mike set-default dev --push
2644
27- - run : mkdocs gh-deploy --force
45+ - name : Deploy versioned docs (release)
46+ if : github.event_name == 'release'
47+ run : |
48+ VERSION=${GITHUB_REF_NAME}
49+ mike deploy --push --update-aliases "${VERSION}" latest
50+ mike set-default latest --push
Original file line number Diff line number Diff line change @@ -86,6 +86,9 @@ plugins:
8686 - blog
8787
8888extra :
89+ version :
90+ provider : mike
91+ alias : true
8992 social :
9093 - icon : fontawesome/brands/github
9194 link : https://github.com/modelcontextprotocol/java-sdk
You can’t perform that action at this time.
0 commit comments