Skip to content

Commit

Permalink
workflow: add ftp-schedule workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Feb 24, 2021
1 parent 5eac9b2 commit 5cc9488
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 28 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
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:
Expand Down Expand Up @@ -94,8 +94,8 @@ jobs:
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com > ~/.ssh/known_hosts
chmod 700 ~/.ssh && chmod 600 ~/.ssh/*
git config --global user.email "[email protected]"
git config --global user.name "vbenAdmin"
git config --locale user.email "[email protected]"
git config --locale user.name "vbenAdmin"
- name: Delete gh-pages branch
run: |
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/ftp-schedule.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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/[email protected]
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
5 changes: 0 additions & 5 deletions .vscode/i18n-ally-reviews.yml

This file was deleted.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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"
},
Expand Down
34 changes: 17 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -1708,10 +1708,10 @@
dependencies:
vue-demi latest

"@windicss/[email protected].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/[email protected].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"
Expand Down Expand Up @@ -8600,10 +8600,10 @@ typedarray-to-buffer@^3.1.5:
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"
Expand Down Expand Up @@ -8953,12 +8953,12 @@ vite-plugin-theme@^0.4.8:
es-module-lexer "^0.3.26"
tinycolor2 "^1.4.2"

[email protected].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==
[email protected].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"

[email protected]:
Expand Down

0 comments on commit 5cc9488

Please sign in to comment.