This commit is contained in:
FairyEver
2019-12-15 00:45:37 +08:00
parent 45b1d7a95b
commit bf5d4ab6dd
60 changed files with 10823 additions and 25573 deletions
+50
View File
@@ -0,0 +1,50 @@
name: Deploy cdn
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
@@ -1,4 +1,4 @@
name: Deploy
name: Deploy https://d2.pub
on:
push:
+21
View File
@@ -0,0 +1,21 @@
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
+1 -1
View File
@@ -1,4 +1,4 @@
name: feedback
name: Feedback
on: [fork, watch, issues]
jobs:
feedback:
+1 -1
View File
@@ -1,4 +1,4 @@
name: Send message on star
name: Star notice
on:
watch: