update to 1.8.4

This commit is contained in:
FairyEver
2020-04-19 22:20:38 +08:00
parent a56eab8486
commit d84f11ad95
29 changed files with 3873 additions and 19088 deletions
-50
View File
@@ -1,50 +0,0 @@
name: Deploy https://cdn.d2.pub
on:
push:
branches:
- master
env:
SITE: https://cdn.d2.pub/
QINIU_BUCKET: d2-cdn
DIST_FOLDER: /dist
PATH_SUFFIX: /preview
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Download qshell
run: |
wget http://devtools.qiniu.com/qshell-linux-x86-v2.4.0.zip
unzip qshell-linux-x86-v2.4.0.zip
mv qshell-linux-x86-v2.4.0 qshell
- name: Install packages
run: npm i
- name: Build
run: npm run build:preview
- name: CDN login
run: ./qshell account ${{ secrets.AK }} ${{ secrets.SK }} GITHUB_ACTION
- name: CDN upload
run: |
REPO=${GITHUB_REPOSITORY//*\//}
echo $SITE > cdnrefresh.txt
./qshell qupload2 \
--src-dir=$GITHUB_WORKSPACE$DIST_FOLDER \
--bucket=$QINIU_BUCKET \
--key-prefix=$REPO$PATH_SUFFIX/ \
--overwrite=true \
--check-exists=true \
--check-hash=true \
--check-size=true \
--rescan-local=true \
--thread-count=32
- name: CDN refresh
run: ./qshell cdnrefresh --dirs -i ./cdnrefresh.txt
-30
View File
@@ -1,30 +0,0 @@
name: Deploy https://d2.pub
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Build
run: |
npm install
npm run build:preview
- 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: /www/d2-admin-start-kit/preview
ARGS: --delete --verbose --parallel=100
-21
View File
@@ -1,21 +0,0 @@
name: Deploy Github
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: dist
BUILD_SCRIPT: npm install && npm run build:github
CLEAN: true
+107
View File
@@ -0,0 +1,107 @@
name: Deploy preview
on:
push:
branches:
- master
jobs:
cdn:
name: CDN
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: bahmutov/npm-install@v1
- name: Set vue cli env
shell: bash
run: |
echo -e "\
VUE_APP_PUBLIC_PATH=/d2-admin-start-kit/preview/\
" > .env.preview.local
cat .env.preview.local | while read line
do
echo $line
done
- name: Build
run: yarn build:preview --report
- name: CDN download qshell
run: |
wget http://devtools.qiniu.com/qshell-linux-x86-v2.4.0.zip
unzip qshell-linux-x86-v2.4.0.zip
mv qshell-linux-x86-v2.4.0 qshell
- name: CDN login
run: ./qshell account ${{ secrets.AK }} ${{ secrets.SK }} GITHUB_ACTION
- name: CDN upload
run: |
./qshell qupload2 \
--src-dir=$GITHUB_WORKSPACE/dist \
--bucket=d2-cdn \
--key-prefix=${GITHUB_REPOSITORY//*\//}/preview/ \
--overwrite=true \
--check-exists=true \
--check-hash=true \
--check-size=true \
--rescan-local=true \
--thread-count=32
- name: CDN refresh
run: |
echo "https://cdn.d2.pub/${GITHUB_REPOSITORY//*\//}/preview/" > cdnrefresh.txt
./qshell cdnrefresh --dirs -i ./cdnrefresh.txt
ftp:
name: FTP
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: bahmutov/npm-install@v1
- name: Set vue cli env
shell: bash
run: |
echo -e "\
VUE_APP_PUBLIC_PATH=/d2-admin-start-kit/preview/\
" > .env.preview.local
cat .env.preview.local | while read line
do
echo $line
done
- name: Build
run: yarn build:preview --report
- 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: /www/d2-admin-start-kit/preview
ARGS: --delete --verbose --parallel=100
gh-pages:
name: Github Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: bahmutov/npm-install@v1
- name: Set vue cli env
shell: bash
run: |
echo -e "\
VUE_APP_PUBLIC_PATH=/d2-admin-start-kit/\
" > .env.preview.local
cat .env.preview.local | while read line
do
echo $line
done
- name: Build
run: yarn build:preview --report
- name: Deploy
uses: peaceiris/actions-gh-pages@v2
env:
PERSONAL_TOKEN: ${{ secrets.ACCESS_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./dist
with:
forceOrphan: true