Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5d1cc35f
authored
Jul 28, 2024
by
vben
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
chore: update ci
1 parent
72a258a5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
7 deletions
.github/workflows/deploy.yml
apps/web-antd/.env.production
website/.vitepress/config.mts
website/src/guide/in-depth/loading.md
.github/workflows/deploy.yml
0 → 100644
View file @
5d1cc35
name
:
Deploy Website on push
on
:
push
:
branches
:
-
main
jobs
:
deploy-web-antd-ftp
:
name
:
Deploy Web Antd
if
:
github.actor != 'dependabot[bot]' && !contains(github.event.head_commit.message, '[skip ci]')
runs-on
:
ubuntu-latest
strategy
:
matrix
:
node-version
:
[
20
]
steps
:
-
name
:
Checkout code
uses
:
actions/checkout@v4
with
:
fetch-depth
:
0
-
name
:
Sed Config Base
shell
:
bash
run
:
|
sed -i "s#VITE_COMPRESS\s*=.*#VITE_COMPRESS = gzip#g" ./apps/web-antd/.env.production
cat ./apps/web-antd/.env.production
-
name
:
Install pnpm
uses
:
pnpm/action-setup@v4
-
name
:
Use Node.js ${{ matrix.node-version }}
uses
:
actions/setup-node@v4
with
:
node-version
:
${{ matrix.node-version }}
cache
:
"
pnpm"
-
name
:
Install dependencies
run
:
pnpm install --frozen-lockfile
-
name
:
Build
run
:
pnpm run build
-
name
:
Sync files
uses
:
SamKirkland/FTP-Deploy-Action@v4.3.5
with
:
server
:
${{ secrets.PRO_FTP_HOST }}
username
:
${{ secrets.WEB_ANTD_FTP_ACCOUNT }}
password
:
${{ secrets.WEB_ANTD_FTP_PASSWORD }}
local-dir
:
./apps/web-antd/dist/
dangerous-clean-slate
:
true
apps/web-antd/.env.production
View file @
5d1cc35
...
@@ -4,7 +4,7 @@ VITE_BASE=/
...
@@ -4,7 +4,7 @@ VITE_BASE=/
VITE_GLOB_API_URL=https://mock-napi.vben.pro/api
VITE_GLOB_API_URL=https://mock-napi.vben.pro/api
# 是否开启压缩,可以设置为 none, brotli, gzip
# 是否开启压缩,可以设置为 none, brotli, gzip
VITE_COMPRESS=
gzip
VITE_COMPRESS=
none
# 是否开启 PWA
# 是否开启 PWA
VITE_PWA=false
VITE_PWA=false
...
...
website/.vitepress/config.mts
View file @
5d1cc35
...
@@ -7,8 +7,8 @@ import { version } from '../../package.json';
...
@@ -7,8 +7,8 @@ import { version } from '../../package.json';
export default defineConfigWithTheme({
export default defineConfigWithTheme({
description: 'Vben Admin& 企业级管理系统框架',
description: 'Vben Admin& 企业级管理系统框架',
head: head(),
head: head(),
lang: 'zh',
lang: 'zh',
srcDir: 'src',
// locales: {
// locales: {
// en: {
// en: {
// label: 'English',
// label: 'English',
...
@@ -19,8 +19,6 @@ export default defineConfigWithTheme({
...
@@ -19,8 +19,6 @@ export default defineConfigWithTheme({
// label: '简体中文',
// label: '简体中文',
// lang: 'zh-CN',
// lang: 'zh-CN',
// },
// },
// },
srcDir: 'src',
themeConfig: {
themeConfig: {
darkModeSwitchLabel: '主题',
darkModeSwitchLabel: '主题',
darkModeSwitchTitle: '切换到深色模式',
darkModeSwitchTitle: '切换到深色模式',
...
@@ -85,6 +83,7 @@ export default defineConfigWithTheme({
...
@@ -85,6 +83,7 @@ export default defineConfigWithTheme({
{ icon: 'github', link: 'https://github.com/vbenjs/vue-vben-admin' },
{ icon: 'github', link: 'https://github.com/vbenjs/vue-vben-admin' },
],
],
},
},
title: 'Vben Admin',
vite: {
vite: {
build: {
build: {
chunkSizeWarningLimit: Infinity,
chunkSizeWarningLimit: Infinity,
...
...
website/src/guide/in-depth/loading.md
View file @
5d1cc35
...
@@ -23,10 +23,10 @@ VITE_INJECT_APP_LOADING=false
...
@@ -23,10 +23,10 @@ VITE_INJECT_APP_LOADING=false
::: tip
::: tip
-
你可以使用跟
`index.html`
一样的语法,比如
`VITE_GLOB_APP_TITLE`
变量,来获取应用的标题。
-
你可以使用跟
`index.html`
一样的语法,比如
`VITE_GLOB_APP_TITLE`
变量,来获取应用的标题。
-
必须保证有一个
`id="__app-loading__"`
的元素
,插件会在这个元素下注入内容
。
-
必须保证有一个
`id="__app-loading__"`
的元素。
-
必须保证有一个
`style[data-app-loading="inject-css"]`
的元素
,插件会在这个元素下注入样式
。
-
必须保证有一个
`style[data-app-loading="inject-css"]`
的元素。
```
html
```
html
{1,4}
<style data-app-loading="inject-css">
<style data-app-loading="inject-css">
/* ... */
/* ... */
</style>
</style>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment