chore: update ci
parent
72a258a5a1
commit
5d1cc35fdd
|
@ -0,0 +1,51 @@
|
|||
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
|
|
@ -4,7 +4,7 @@ VITE_BASE=/
|
|||
VITE_GLOB_API_URL=https://mock-napi.vben.pro/api
|
||||
|
||||
# 是否开启压缩,可以设置为 none, brotli, gzip
|
||||
VITE_COMPRESS=gzip
|
||||
VITE_COMPRESS=none
|
||||
|
||||
# 是否开启 PWA
|
||||
VITE_PWA=false
|
||||
|
|
|
@ -7,8 +7,8 @@ import { version } from '../../package.json';
|
|||
export default defineConfigWithTheme({
|
||||
description: 'Vben Admin& 企业级管理系统框架',
|
||||
head: head(),
|
||||
|
||||
lang: 'zh',
|
||||
srcDir: 'src',
|
||||
// locales: {
|
||||
// en: {
|
||||
// label: 'English',
|
||||
|
@ -19,8 +19,6 @@ export default defineConfigWithTheme({
|
|||
// label: '简体中文',
|
||||
// lang: 'zh-CN',
|
||||
// },
|
||||
// },
|
||||
srcDir: 'src',
|
||||
themeConfig: {
|
||||
darkModeSwitchLabel: '主题',
|
||||
darkModeSwitchTitle: '切换到深色模式',
|
||||
|
@ -85,6 +83,7 @@ export default defineConfigWithTheme({
|
|||
{ icon: 'github', link: 'https://github.com/vbenjs/vue-vben-admin' },
|
||||
],
|
||||
},
|
||||
title: 'Vben Admin',
|
||||
vite: {
|
||||
build: {
|
||||
chunkSizeWarningLimit: Infinity,
|
||||
|
|
|
@ -23,10 +23,10 @@ VITE_INJECT_APP_LOADING=false
|
|||
::: tip
|
||||
|
||||
- 你可以使用跟`index.html`一样的语法,比如`VITE_GLOB_APP_TITLE`变量,来获取应用的标题。
|
||||
- 必须保证有一个`id="__app-loading__"`的元素,插件会在这个元素下注入内容。
|
||||
- 必须保证有一个`style[data-app-loading="inject-css"]`的元素,插件会在这个元素下注入样式。
|
||||
- 必须保证有一个`id="__app-loading__"`的元素。
|
||||
- 必须保证有一个`style[data-app-loading="inject-css"]`的元素。
|
||||
|
||||
```html
|
||||
```html{1,4}
|
||||
<style data-app-loading="inject-css">
|
||||
/* ... */
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue