提交 8ccf778f 编写于 作者: V Vben

workflow: update deploy workflow [deploy]

上级 7e564c29
...@@ -6,17 +6,111 @@ on: ...@@ -6,17 +6,111 @@ on:
- main - main
jobs: jobs:
build-deploy: push-to-ftp:
if: "contains(github.event.head_commit.message, '[deploy]')"
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Sed Config Base
shell: bash
run: |
sed -i 's#VITE_PUBLIC_PATH\s*=.*#VITE_PUBLIC_PATH = /next/#g' ./.env.production
sed -i "s#VITE_BUILD_COMPRESS\s*=.*#VITE_BUILD_COMPRESS = 'gzip'#g" ./.env.production
cat ./.env.production
- name: use Node.js 14
uses: actions/setup-node@v2.1.2
with:
node-version: '14.x'
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Build
run: |
yarn install
yarn run build
- name: Deploy
uses: SamKirkland/FTP-Deploy-Action@2.0.0
env:
FTP_SERVER: ${{ secrets.FTP_SERVER }}
FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
METHOD: sftp
PORT: ${{ secrets.FTP_PORT }}
LOCAL_DIR: dist
REMOTE_DIR: /srv/www/vben-admin
ARGS: --delete --verbose --parallel=80
push-to-gh-page:
if: "contains(github.event.head_commit.message, '[deploy]')"
runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v1 - name: Checkout
- run: npm install uses: actions/checkout@v2
- run: npm run build
- name: Sed Config Base
shell: bash
run: |
sed -i 's#VITE_PUBLIC_PATH\s*=.*#VITE_PUBLIC_PATH = /vue-vben-admin/#g' ./.env.production
sed -i "s#VITE_BUILD_COMPRESS\s*=.*#VITE_BUILD_COMPRESS = 'gzip'#g" ./.env.production
cat ./.env.production
- name: use Node.js 14
uses: actions/setup-node@v2.1.2
with:
node-version: '14.x'
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Set SSH Environment
env:
DOCS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
run: |
mkdir -p ~/.ssh/
echo "$ACTIONS_DEPLOY_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com > ~/.ssh/known_hosts
chmod 700 ~/.ssh && chmod 600 ~/.ssh/*
git config --global user.email "vbenadmin@163.com"
git config --global user.name "vbenAdmin"
- name: Delete gh-pages branch
run: |
git push origin --delete gh-pages
- name: Build
run: |
yarn install
yarn run build
- name: Deploy - name: Deploy
uses: peaceiris/actions-gh-pages@v2.5.0 uses: peaceiris/actions-gh-pages@v2.5.0
env: env:
ACTIONS_DEPLOY_KEY: ${{secrets.ACTIONS_DEPLOY_KEY}} ACTIONS_DEPLOY_KEY: ${{secrets.ACTIONS_DEPLOY_KEY}}
PUBLISH_BRANCH: gh-pages PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: dist PUBLISH_DIR: ./dist
with:
forceOrphan: true
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
### ⚡ Performance Improvements ### ⚡ Performance Improvements
- 登录界面动画优化 - 登录界面动画优化
- 修复 github 仓库体积过大问题.
### 🐛 Bug Fixes ### 🐛 Bug Fixes
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
"name": "vben-admin", "name": "vben-admin",
"version": "2.0.1", "version": "2.0.1",
"scripts": { "scripts": {
"bootstrap": "yarn install",
"serve": "vite", "serve": "vite",
"dev": "vite", "dev": "vite",
"build": "vite build && esno ./build/script/postBuild.ts", "build": "vite build && esno ./build/script/postBuild.ts",
...@@ -26,7 +25,7 @@ ...@@ -26,7 +25,7 @@
}, },
"dependencies": { "dependencies": {
"@iconify/iconify": "^2.0.0-rc.6", "@iconify/iconify": "^2.0.0-rc.6",
"@vueuse/core": "^4.2.1", "@vueuse/core": "^4.2.2",
"@zxcvbn-ts/core": "^0.2.0", "@zxcvbn-ts/core": "^0.2.0",
"ant-design-vue": "2.0.0", "ant-design-vue": "2.0.0",
"apexcharts": "^3.25.0", "apexcharts": "^3.25.0",
...@@ -49,8 +48,8 @@ ...@@ -49,8 +48,8 @@
"xlsx": "^0.16.9" "xlsx": "^0.16.9"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^11.0.0", "@commitlint/cli": "^12.0.0",
"@commitlint/config-conventional": "^11.0.0", "@commitlint/config-conventional": "^12.0.0",
"@iconify/json": "^1.1.307", "@iconify/json": "^1.1.307",
"@ls-lint/ls-lint": "^1.9.2", "@ls-lint/ls-lint": "^1.9.2",
"@purge-icons/generated": "^0.7.0", "@purge-icons/generated": "^0.7.0",
...@@ -63,8 +62,8 @@ ...@@ -63,8 +62,8 @@
"@types/rollup-plugin-visualizer": "^2.6.0", "@types/rollup-plugin-visualizer": "^2.6.0",
"@types/sortablejs": "^1.10.6", "@types/sortablejs": "^1.10.6",
"@types/yargs": "^16.0.0", "@types/yargs": "^16.0.0",
"@typescript-eslint/eslint-plugin": "^4.15.1", "@typescript-eslint/eslint-plugin": "^4.15.2",
"@typescript-eslint/parser": "^4.15.1", "@typescript-eslint/parser": "^4.15.2",
"@vitejs/plugin-legacy": "^1.3.1", "@vitejs/plugin-legacy": "^1.3.1",
"@vitejs/plugin-vue": "^1.1.4", "@vitejs/plugin-vue": "^1.1.4",
"@vitejs/plugin-vue-jsx": "^1.1.0", "@vitejs/plugin-vue-jsx": "^1.1.0",
...@@ -81,7 +80,7 @@ ...@@ -81,7 +80,7 @@
"esno": "^0.4.4", "esno": "^0.4.4",
"fs-extra": "^9.1.0", "fs-extra": "^9.1.0",
"http-server": "^0.12.3", "http-server": "^0.12.3",
"husky": "^5.1.0", "husky": "^5.1.1",
"is-ci": "^3.0.0", "is-ci": "^3.0.0",
"less": "^4.1.1", "less": "^4.1.1",
"lint-staged": "^10.5.4", "lint-staged": "^10.5.4",
...@@ -95,16 +94,16 @@ ...@@ -95,16 +94,16 @@
"stylelint-order": "^4.1.0", "stylelint-order": "^4.1.0",
"ts-node": "^9.1.1", "ts-node": "^9.1.1",
"typescript": "^4.1.5", "typescript": "^4.1.5",
"vite": "2.0.1", "vite": "2.0.2",
"vite-plugin-compression": "^0.2.1", "vite-plugin-compression": "^0.2.2",
"vite-plugin-html": "^2.0.1", "vite-plugin-html": "^2.0.2",
"vite-plugin-imagemin": "^0.2.8", "vite-plugin-imagemin": "^0.2.8",
"vite-plugin-mock": "^2.1.4", "vite-plugin-mock": "^2.1.5",
"vite-plugin-purge-icons": "^0.7.0", "vite-plugin-purge-icons": "^0.7.0",
"vite-plugin-pwa": "^0.5.3", "vite-plugin-pwa": "^0.5.3",
"vite-plugin-style-import": "^0.7.3", "vite-plugin-style-import": "^0.7.4",
"vite-plugin-theme": "^0.4.8", "vite-plugin-theme": "^0.4.8",
"vite-plugin-windicss": "0.4.7", "vite-plugin-windicss": "0.4.9",
"vue-eslint-parser": "^7.5.0", "vue-eslint-parser": "^7.5.0",
"yargs": "^16.2.0" "yargs": "^16.2.0"
}, },
......
...@@ -44,14 +44,15 @@ function createEnterPlugin(maxOutput = 10) { ...@@ -44,14 +44,15 @@ function createEnterPlugin(maxOutput = 10) {
}; };
}; };
const handler = ({ addBase }) => { const handler = ({ addBase }) => {
const addRawCss = {};
for (let index = 1; index < maxOutput; index++) { for (let index = 1; index < maxOutput; index++) {
addBase({ Object.assign(addRawCss, {
...createCss(index, 'x'), ...createCss(index, 'x'),
...createCss(index, 'y'), ...createCss(index, 'y'),
}); });
} }
addBase({ addBase({
...addRawCss,
[`@keyframes enter-x-animation`]: { [`@keyframes enter-x-animation`]: {
to: { to: {
opacity: '1', opacity: '1',
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册