Skip to content

Commit

Permalink
Merge pull request #275 from yin1999/fix-ui-update
Browse files Browse the repository at this point in the history
fix(ci): resume the build logic of the front end
  • Loading branch information
chickenlj authored May 8, 2024
2 parents 86c8716 + 81b9756 commit 754863c
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 44 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/dubboctl-ui-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ on:
paths:
- .github/workflows/dubboctl-ui-update.yaml
- ui-vue3/**
- Makefile
# Trigger the workflow when a pull request is opened or updated.
# This is to make sure the build process would not be broken by the
# changes in the pull request.
Expand All @@ -35,7 +34,6 @@ on:
paths:
- .github/workflows/dubboctl-ui-update.yaml
- ui-vue3/**
- Makefile

jobs:
lint:
Expand Down Expand Up @@ -64,11 +62,27 @@ jobs:
update-ui:
runs-on: ubuntu-latest
if: github.repository == 'apache/dubbo-kubernetes'
defaults:
run:
working-directory: ui-vue3
steps:
- uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version-file: "ui-vue3/.nvmrc"

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Run Dubboctl UI build
run: make build-ui
run: yarn build

- name: Move build artifacts
run: |
rm -rf ../app/dubbo-ui/dist/
mv dist/ ../app/dubbo-ui/dist/
- name: Create PR if the build is changed
# This step will be skipped if the workflow is triggered by a pull request.
Expand Down
37 changes: 0 additions & 37 deletions ui-vue3/Dockerfile

This file was deleted.

20 changes: 17 additions & 3 deletions ui-vue3/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
`Vue3` `Vite` `TypeScript` `Ant Design Vue` `AntV|echarts` `lodash` `i18n` `colorful theme`

## Introduction

This project is the front-end of dubbo-kube.

1. home
Expand Down Expand Up @@ -44,6 +45,7 @@ yarn add [email protected]
```

## Develop

1. todo
> if a function is not complete but show the entry in your page,
> please use notification.todo to mark it
Expand Down Expand Up @@ -245,8 +247,20 @@ function globalQuestion() {
},
```
## Build and Deploy
1. Build
```shell
yarn build
```
2. Deploy
Copy the `dist` folder to the path `app/dubbo-ui/dist/`
```shell
# run the following command in the root path of the project
rm -rf app/dubbo-ui/dist
cp -r dist/ app/dubbo-ui/
```
2 changes: 1 addition & 1 deletion ui-vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"type-check": "vue-tsc --build --force",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .gitignore",
"lint:fix": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"prepare": "husky install",
"prepare": "husky || true",
"prettier-format": "prettier --write src/",
"prettier-check": "prettier --check src/"
},
Expand Down

0 comments on commit 754863c

Please sign in to comment.