File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed
Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -14,18 +14,17 @@ jobs:
1414 - name : Checkout Branch
1515 uses : actions/checkout@v2
1616
17- - name : Set Base Url
17+ - name : Inject Base Url
1818 run : |
1919 BRANCH=$(echo ${GITHUB_REF} | sed -e 's/refs\/heads\///')
20- BEFORE='@base@'
21- if [[ $BRANCH == ver/* ]]; then
22- BRANCH_NAME=$(echo $BRANCH | sed 's|origin/||')
23- AFTER=$(echo $BRANCH_NAME | sed 's|build/ver/||')
24- else
25- AFTER=''
20+ BRANCH_NAME=$(echo $BRANCH | sed 's|origin/||')
21+ if [[ $BRANCH_NAME == ver/* ]]; then
22+ VER=$(echo $BRANCH_NAME | sed 's|build/ver/||')
23+ echo sed -i "s/BASE_INJECT_POINT/${VER}/g" ./docs/.vitepress/config.mts > replace.sh
24+ chmod +x replace.sh
25+ ./replace.sh
26+ rm replace.sh
2627 fi
27- echo $AFTER
28- sed -i "s/${BEFORE}/${AFTER}/g" ./docs/.vitepress/config.mts
2928
3029 - name : Setup Node.js
3130 uses : actions/setup-node@v2
Original file line number Diff line number Diff line change @@ -27,11 +27,11 @@ const vitepressOptions: UserConfig = {
2727 description : "Docs of CommandAPI" ,
2828 cleanUrls : true ,
2929 metaChunk : true ,
30- base : "@base@" ,
3130 ignoreDeadLinks : true , // TODO remove when all things are done
3231 rewrites : {
3332 'en/:rest*' : ':rest*'
3433 } ,
34+ base : 'BASE_INJECT_POINT' ,
3535 vite : {
3636 optimizeDeps : {
3737 exclude : [
You can’t perform that action at this time.
0 commit comments