Skip to content

Commit 40810b0

Browse files
committed
feat: Update alias
1 parent 6b54ba3 commit 40810b0

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/deploy-docs-next.yaml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ jobs:
2828
build:
2929
runs-on: ubuntu-latest
3030
env:
31-
DOC_VERSION: v5
32-
DOC_ALIAS: stable
33-
GIT_COMMITTER_NAME: "Konrad Kost"
34-
GIT_COMMITTER_EMAIL: "xxxx"
31+
DOC_VERSION: v5 # The directory in gh-pages where the documentation would be deployed
32+
DOC_ALIAS: next # Change this to update the alias route. Note: Check the old alias when changing this!
33+
GIT_COMMITTER_NAME: "OpenUI5 Bot"
34+
GIT_COMMITTER_EMAIL: "[email protected]"
3535
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3636
steps:
3737
- name: Checkout
@@ -57,8 +57,6 @@ jobs:
5757
sudo chown -R $(id -u):$(id -g) ./site
5858
- name: generate CLI doc
5959
run: npm run generate-cli-doc
60-
# - name: generate next config
61-
# run: npm run replace-base-path-next
6260
- name: Build jsdoc
6361
run: npm run jsdoc-generate
6462
- name: Build vitepress build
@@ -76,9 +74,16 @@ jobs:
7674
run: |
7775
rm -rf ./gh-pages/schema
7876
cp -R ./site/schema ./gh-pages/
79-
rm -rf ./gh-pages/v5/
80-
cp -R ./packages/documentation/dist ./gh-pages/v5/
77+
rm -rf ./gh-pages/${DOC_VERSION}/
78+
cp -R ./packages/documentation/dist ./gh-pages/${DOC_VERSION}/
8179
cp ./scripts/resources/custom404.html ./gh-pages/404.html
80+
- name: Create or update alias route
81+
run: |
82+
cd ./gh-pages
83+
# Remove existing alias if it exists (file or symlink)
84+
rm -rf "${DOC_ALIAS}"
85+
# Create symlink from alias to version directory
86+
ln -s "${DOC_VERSION}" "${DOC_ALIAS}"
8287
- name: Publish Docs
8388
run: |
8489
cd ./gh-pages

0 commit comments

Comments
 (0)