From 5cc9488bd67bd95a9b9ce4cb64785485c285ea5d Mon Sep 17 00:00:00 2001
From: Vben <anncwb@126.com>
Date: 星期三, 24 二月 2021 20:45:52 +0800
Subject: [PATCH] workflow: add ftp-schedule workflow

---
 /dev/null                          |    5 --
 .github/workflows/ftp-schedule.yml |   55 +++++++++++++++++++++++++++
 yarn.lock                          |   34 ++++++++--------
 .github/workflows/deploy.yml       |    6 +-
 package.json                       |    6 +-
 5 files changed, 78 insertions(+), 28 deletions(-)

diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index f287a00..68fc98f 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -54,7 +54,7 @@
           REMOTE_DIR: /srv/www/vben-admin
           ARGS: --delete --verbose --parallel=80
 
-  push-to-gh-page:
+  push-to-gh-pages:
     if: "contains(github.event.head_commit.message, '[deploy]')"
     runs-on: ubuntu-latest
     steps:
@@ -94,8 +94,8 @@
           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"
+          git config --locale user.email "vbenadmin@163.com"
+          git config --locale user.name "vbenAdmin"
 
       - name: Delete gh-pages branch
         run: |
diff --git a/.github/workflows/ftp-schedule.yml b/.github/workflows/ftp-schedule.yml
new file mode 100644
index 0000000..8d6bdd7
--- /dev/null
+++ b/.github/workflows/ftp-schedule.yml
@@ -0,0 +1,55 @@
+name: schedule-push-to-ftp
+
+# Timed deployment project
+on:
+  push:
+  schedule:
+    - cron: '0 15 * * *'
+
+jobs:
+  push-to-ftp:
+    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
diff --git a/.vscode/i18n-ally-reviews.yml b/.vscode/i18n-ally-reviews.yml
deleted file mode 100644
index 0b288c1..0000000
--- a/.vscode/i18n-ally-reviews.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-# Review comments generated by i18n-ally. Please commit this file.
-
-reviews:
-  sys.login.autoLogin:
-    description: '1'
diff --git a/package.json b/package.json
index 35e3024..cbbc5ba 100644
--- a/package.json
+++ b/package.json
@@ -66,7 +66,7 @@
     "@typescript-eslint/parser": "^4.15.2",
     "@vitejs/plugin-legacy": "^1.3.1",
     "@vitejs/plugin-vue": "^1.1.4",
-    "@vitejs/plugin-vue-jsx": "^1.1.0",
+    "@vitejs/plugin-vue-jsx": "^1.1.1",
     "@vue/compiler-sfc": "^3.0.5",
     "autoprefixer": "^10.2.4",
     "commitizen": "^4.2.3",
@@ -93,7 +93,7 @@
     "stylelint-config-standard": "^20.0.0",
     "stylelint-order": "^4.1.0",
     "ts-node": "^9.1.1",
-    "typescript": "^4.1.5",
+    "typescript": "^4.2.2",
     "vite": "2.0.2",
     "vite-plugin-compression": "^0.2.2",
     "vite-plugin-html": "^2.0.2",
@@ -103,7 +103,7 @@
     "vite-plugin-pwa": "^0.5.3",
     "vite-plugin-style-import": "^0.7.4",
     "vite-plugin-theme": "^0.4.8",
-    "vite-plugin-windicss": "0.4.9",
+    "vite-plugin-windicss": "0.4.12",
     "vue-eslint-parser": "^7.5.0",
     "yargs": "^16.2.0"
   },
diff --git a/yarn.lock b/yarn.lock
index 687a32a..15000e3 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1574,10 +1574,10 @@
     regenerator-runtime "^0.13.7"
     systemjs "^6.8.3"
 
-"@vitejs/plugin-vue-jsx@^1.1.0":
-  version "1.1.0"
-  resolved "https://registry.npmjs.org/@vitejs/plugin-vue-jsx/-/plugin-vue-jsx-1.1.0.tgz#9bd45834db9e8d29a569e330917142c073dab347"
-  integrity sha512-7fpB9rdhWZ7DSdcK/w2sEuSaeOiSyhwu/2ojwl8qz1pshWEPQj9F2g9TaZtEBz298nOKBM0hUOCcKKRUO8Ga8A==
+"@vitejs/plugin-vue-jsx@^1.1.1":
+  version "1.1.1"
+  resolved "https://registry.npmjs.org/@vitejs/plugin-vue-jsx/-/plugin-vue-jsx-1.1.1.tgz#f9e1bb89591f8529218974d6e55d205964784bc9"
+  integrity sha512-xVpDaXmBsSMkUrYm1qhCrXqlzWuadwbYCPp0pm5N9g6pECTtd5+KgGN7SkIyDER+1cl+0vhkXdZAHu1MaS11gw==
   dependencies:
     "@babel/core" "^7.12.10"
     "@babel/plugin-syntax-import-meta" "^7.10.4"
@@ -1708,10 +1708,10 @@
   dependencies:
     vue-demi latest
 
-"@windicss/plugin-utils@0.4.9":
-  version "0.4.9"
-  resolved "https://registry.npmjs.org/@windicss/plugin-utils/-/plugin-utils-0.4.9.tgz#d2f61423c82421cf5507374120691ea39127d060"
-  integrity sha512-dD1Fagdtunr5om8SQMoJyxsFRL1Gh4JqEWlCIWxduMddHbY+S+4Atwifehy6T/2dCoyaGxlLk5yHbeNEdw40eA==
+"@windicss/plugin-utils@0.4.12":
+  version "0.4.12"
+  resolved "https://registry.npmjs.org/@windicss/plugin-utils/-/plugin-utils-0.4.12.tgz#b75f218ec11e2970e6ccb7db556cf9930c1cb9ec"
+  integrity sha512-5nZm/qHfnBBYWdtNZmU6IpXO5i/ckIiv+PhyeBOAGl5EXfly7h84YJ4NrkixusbhWMBwUdPi9Bs5m9rOR3oMpg==
   dependencies:
     esbuild "^0.8.50"
     esbuild-register "^2.0.0"
@@ -8600,10 +8600,10 @@
   dependencies:
     is-typedarray "^1.0.0"
 
-typescript@^4.1.5:
-  version "4.1.5"
-  resolved "https://registry.npmjs.org/typescript/-/typescript-4.1.5.tgz#123a3b214aaff3be32926f0d8f1f6e704eb89a72"
-  integrity sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA==
+typescript@^4.2.2:
+  version "4.2.2"
+  resolved "https://registry.npmjs.org/typescript/-/typescript-4.2.2.tgz#1450f020618f872db0ea17317d16d8da8ddb8c4c"
+  integrity sha512-tbb+NVrLfnsJy3M59lsDgrzWIflR4d4TIUjz+heUnHZwdF7YsrMTKoRERiIvI2lvBG95dfpLxB21WZhys1bgaQ==
 
 uglify-js@^3.1.4:
   version "3.12.5"
@@ -8953,12 +8953,12 @@
     es-module-lexer "^0.3.26"
     tinycolor2 "^1.4.2"
 
-vite-plugin-windicss@0.4.9:
-  version "0.4.9"
-  resolved "https://registry.npmjs.org/vite-plugin-windicss/-/vite-plugin-windicss-0.4.9.tgz#af7fdfb5b23487e562fa7f7f78c6ea42633df719"
-  integrity sha512-Q5S2fnVyOcAA12ERHLbXwCzr6NWQmCOluUVtlnKW29liMv7rN3k21bokyLlL+S7o23MLtK5Dbi54FuNqMQGibA==
+vite-plugin-windicss@0.4.12:
+  version "0.4.12"
+  resolved "https://registry.npmjs.org/vite-plugin-windicss/-/vite-plugin-windicss-0.4.12.tgz#6a967daaaea084afea4352a019c316ff03eea099"
+  integrity sha512-IXYgvJ58jMF1/lOejZGeOOmNotI+L+W9vMvdJBOykphsk7X+qc8nZfWKW0VvmX2JcI5Ry+QuQMM4JX0xVKnWYQ==
   dependencies:
-    "@windicss/plugin-utils" "0.4.9"
+    "@windicss/plugin-utils" "0.4.12"
     windicss "^2.2.0"
 
 vite@2.0.2:

--
Gitblit v1.8.0