Files
d2-admin-start-kit/.github/workflows/qiniu.yml
T
FairyEver d9c4f96f80 ci
Former-commit-id: 144e190a0203b694ab0342e92c73c6e0e8e0347b
2019-11-27 10:04:13 +08:00

31 lines
861 B
YAML

name: Build and upload to qiniu CDN
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: install packages
run: npm i
- name: build
run: npm run build:github
- name: qiniu login
run: ./deploy/qshell account ${{ secrets.AK }} ${{ secrets.SK }} liyang
- name: qiniu upload
run: |
dist=$GITHUB_WORKSPACE/dist
bucket=fairyever-site
prefix=d2-admin-start-kit/preview/
./deploy/qshell qupload2 --src-dir=$dist --bucket=$bucket --key-prefix=$prefix --overwrite=true --check-exists=true --check-hash=true --check-size=true --rescan-local=true
- name: refresn CDN
run: ./deploy/qshell cdnrefresh --dirs -i ./deploy/cdnrefresh.txt