ci
Former-commit-id: 144e190a0203b694ab0342e92c73c6e0e8e0347b
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
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
|
||||
@@ -0,0 +1,17 @@
|
||||
name: Send message on star
|
||||
|
||||
on:
|
||||
watch:
|
||||
types: [started]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: send bark message
|
||||
run: |
|
||||
repo=${GITHUB_REPOSITORY//\//:}
|
||||
actor=$GITHUB_ACTOR
|
||||
curl https://api.day.app/EweNWLE36rvVR8EFfWGq7k/$actor%20star%20了你的仓库/$repo
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
language: node_js
|
||||
node_js: stable
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- "node_modules"
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
script:
|
||||
- npm run build:travis
|
||||
|
||||
before_install:
|
||||
- curl -o- -L https://yarnpkg.com/install.sh | bash
|
||||
- export PATH=$HOME/.yarn/bin:$PATH
|
||||
|
||||
after_success:
|
||||
- ./deploy/qshell account $AK $SK liyang
|
||||
- ./deploy/qshell qupload ./deploy/upload.conf
|
||||
- ./deploy/qshell cdnrefresh --dirs -i ./deploy/cdnrefresh.txt
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"src_dir" : "/home/travis/build/d2-projects/d2-admin-start-kit/dist",
|
||||
"bucket" : "fairyever-site",
|
||||
"key_prefix" : "d2-admin-start-kit/preview/",
|
||||
"ignore_dir" : false,
|
||||
"overwrite" : true,
|
||||
"check_exists" : true,
|
||||
"check_hash" : true,
|
||||
"check_size" : true,
|
||||
"rescan_local" : true
|
||||
}
|
||||
Reference in New Issue
Block a user