Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Migrate UI5 Tooling documentation to VitePress #1006

Merged
merged 12 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .github/workflows/deploy-docs-next.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Sample workflow for building and deploying a VitePress site to GitHub Pages
#
name: Deploy VitePress site to Pages (next)

on:
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
# using the `master` branch as the default branch.
push:
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
DOC_VERSION: v4
DOC_ALIAS: stable
GIT_COMMITTER_NAME: "Konrad Kost"
GIT_COMMITTER_EMAIL: "xxxx"
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: npm ci
- name: Fetch gh-pages branch
run: git fetch origin gh-pages --depth=1
- name: Set /site ownership to current user
run: |
mkdir site
sudo chown -R $(id -u):$(id -g) ./site
- name: generate CLI doc
run: npm run generate-cli-doc
- name: generate next config
run: npm run replace-base-path-next
- name: Build jsdoc
run: npm run jsdoc-generate
- name: Build vitepress build
run: npm run docs-generate
- name: Build Schema
run: |
npm run schema-generate
npm run schema-workspace-generate
- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
- name: Copy the additional resources to gh-pages
run: |
rm -rf ./gh-pages/schema
cp -R ./site/schema ./gh-pages/
rm -rf ./gh-pages/next/
cp -R ./site ./gh-pages/next/
cp ./scripts/resources/custom404.html ./gh-pages/404.html
- name: Publish Docs
run: |
cd ./gh-pages
git config --local user.email $GIT_COMMITTER_EMAIL
git config --local user.name $GIT_COMMITTER_NAME
git add .
git commit -m "Updating supplemental resources for ${DOC_VERSION} documentation deployment"
git push
87 changes: 87 additions & 0 deletions .github/workflows/deploy-docs-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Sample workflow for building and deploying a VitePress site to GitHub Pages
#
name: Deploy VitePress site to Pages (stable)

on:
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
# using the `master` branch as the default branch.
push:
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
DOC_VERSION: v4
DOC_ALIAS: stable
GIT_COMMITTER_NAME: "Konrad Kost"
GIT_COMMITTER_EMAIL: "xxxx"
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: npm ci
- name: Fetch gh-pages branch
run: git fetch origin gh-pages --depth=1
- name: Set /site ownership to current user
run: |
mkdir site
sudo chown -R $(id -u):$(id -g) ./site
- name: generate CLI doc
run: npm run generate-cli-doc
- name: generate stable Config
run: npm run replace-base-path-stable
- name: Build jsdoc
run: npm run jsdoc-generate
- name: Build vitepress build
run: npm run docs-generate
- name: Build Schema
run: |
npm run schema-generate
npm run schema-workspace-generate
- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
- name: Copy the additional resources to gh-pages
run: |
rm -rf ./gh-pages/schema
cp -R ./site/schema ./gh-pages/
rm -rf ./gh-pages/stable/
cp -R ./site ./gh-pages/stable/
cp ./scripts/resources/custom404.html ./gh-pages/404.html
- name: Publish Docs
run: |
cd ./gh-pages
git config --local user.email $GIT_COMMITTER_EMAIL
git config --local user.name $GIT_COMMITTER_NAME
git add .
git commit -m "Updating supplemental resources for ${DOC_VERSION} documentation deployment"
git push
140 changes: 79 additions & 61 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,85 @@
name: Build and Deploy Docs
# Sample workflow for building and deploying a VitePress site to GitHub Pages
#
name: Deploy VitePress site to Pages

on:
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
# using the `master` branch as the default branch.
push:
branches:
- main
jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
env:
MIKE_VERSION: v4
MIKE_ALIAS: stable
DOCKER_IMAGE: ui5-tooling/mkdocs-material
GIT_COMMITTER_NAME: "OpenUI5 Bot"
GIT_COMMITTER_EMAIL: "openui5@sap.com"

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use Node.js LTS 20.x
uses: actions/setup-node@v4.0.3
with:
node-version: 20.x
branches: [main]

- name: Install npm dependencies
run: npm ci
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

- name: Fetch gh-pages branch
run: git fetch origin gh-pages --depth=1
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write

- name: Set /site ownership to current user
run: |
mkdir site
sudo chown -R $(id -u):$(id -g) ./site
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false

- name: Build docs with Mike
run: ./scripts/buildDocs.sh

- name: Publish docs
run: docker run --rm -v $(pwd):/docs --entrypoint mike --env GIT_COMMITTER_NAME="${GIT_COMMITTER_NAME}" --env GIT_COMMITTER_EMAIL="${GIT_COMMITTER_EMAIL}" $DOCKER_IMAGE set-default stable --push

- name: Build Schema
run: |
npm run schema-generate
npm run schema-workspace-generate

- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
- name: Copy the additional resources to gh-pages
run: |
rm -rf ./gh-pages/schema
cp -R ./site/schema ./gh-pages/
rm -rf ./gh-pages/$MIKE_VERSION/api
cp -R ./site/api ./gh-pages/$MIKE_VERSION/
cp ./scripts/resources/custom404.html ./gh-pages/404.html
- name: Publish Docs
run: |
cd ./gh-pages
git config --local user.email $GIT_COMMITTER_EMAIL
git config --local user.name $GIT_COMMITTER_NAME
git add .
git commit -m "Updating supplemental resources for ${MIKE_VERSION} documentation deployment"
git push
jobs:
# Build job
build:
runs-on: ubuntu-latest
env:
DOC_VERSION: v4
DOC_ALIAS: stable
GIT_COMMITTER_NAME: "Konrad Kost"
GIT_COMMITTER_EMAIL: "xxxx"
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: npm ci
- name: Fetch gh-pages branch
run: git fetch origin gh-pages --depth=1
- name: Set /site ownership to current user
run: |
mkdir site
sudo chown -R $(id -u):$(id -g) ./site
- name: generate CLI doc
run: npm run generate-cli-doc
- name: Build jsdoc
run: npm run jsdoc-generate
- name: Build vitepress build
run: npm run docs-generate
- name: Build Schema
run: |
npm run schema-generate
npm run schema-workspace-generate
- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
- name: Copy the additional resources to gh-pages
run: |
rm -rf ./gh-pages/schema
cp -R ./site/schema ./gh-pages/
rm -rf ./gh-pages/$DOC_VERSION
cp -R ./site ./gh-pages/$DOC_VERSION/
cp ./scripts/resources/custom404.html ./gh-pages/404.html
- name: Publish Docs
run: |
cd ./gh-pages
git config --local user.email $GIT_COMMITTER_EMAIL
git config --local user.name $GIT_COMMITTER_NAME
git add .
git commit -m "Updating supplemental resources for ${DOC_VERSION} documentation deployment"
git push
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,5 @@ site/

# Custom files
docs/pages/CLI.md
docs/CLI.md

52 changes: 52 additions & 0 deletions .vitepress/cache/deps/_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"hash": "b5613d59",
"configHash": "20d54342",
"lockfileHash": "23ddd169",
"browserHash": "87e1e698",
"optimized": {
"vue": {
"src": "../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "457aabc7",
"needsInterop": false
},
"vitepress > @vue/devtools-api": {
"src": "../../../node_modules/@vue/devtools-api/dist/index.js",
"file": "vitepress___@vue_devtools-api.js",
"fileHash": "a0e6c966",
"needsInterop": false
},
"vitepress > @vueuse/core": {
"src": "../../../node_modules/@vueuse/core/index.mjs",
"file": "vitepress___@vueuse_core.js",
"fileHash": "61414c6a",
"needsInterop": false
},
"vitepress > @vueuse/integrations/useFocusTrap": {
"src": "../../../node_modules/@vueuse/integrations/useFocusTrap.mjs",
"file": "vitepress___@vueuse_integrations_useFocusTrap.js",
"fileHash": "df15f6d5",
"needsInterop": false
},
"vitepress > mark.js/src/vanilla.js": {
"src": "../../../node_modules/mark.js/src/vanilla.js",
"file": "vitepress___mark__js_src_vanilla__js.js",
"fileHash": "89b842e5",
"needsInterop": false
},
"vitepress > minisearch": {
"src": "../../../node_modules/minisearch/dist/es/index.js",
"file": "vitepress___minisearch.js",
"fileHash": "3f20f67f",
"needsInterop": false
}
},
"chunks": {
"chunk-YVCV7MZG": {
"file": "chunk-YVCV7MZG.js"
},
"chunk-45KCXATN": {
"file": "chunk-45KCXATN.js"
}
}
}
Loading