2020-05-01 05:11:42 +00:00
|
|
|
name: Continuous Integration #action名称
|
2020-05-01 05:44:08 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2020-05-01 05:05:10 +00:00
|
|
|
|
|
|
|
jobs:
|
2020-05-01 05:44:08 +00:00
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
2020-05-01 05:05:10 +00:00
|
|
|
steps:
|
2020-05-01 05:44:08 +00:00
|
|
|
- name: Checkout master
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
ref: master
|
|
|
|
|
|
|
|
- name: Setup node
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: "12.x"
|
2020-05-01 05:11:42 +00:00
|
|
|
|
2020-05-01 05:44:08 +00:00
|
|
|
- name: Build project
|
|
|
|
run: yarn && yarn build
|
2020-05-01 06:28:55 +00:00
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
|
|
|
|
- name: see
|
|
|
|
run: ls
|
2020-05-01 05:41:00 +00:00
|
|
|
|
|
|
|
- name: Upload COS
|
2020-05-01 05:44:08 +00:00
|
|
|
uses: zkqiang/tencent-cos-action@master
|
|
|
|
with:
|
2020-05-01 06:36:37 +00:00
|
|
|
args: delete -r -f / && upload -r ./build /
|
2020-05-01 05:44:08 +00:00
|
|
|
secret_id: ${{ secrets.SECRET_ID }}
|
|
|
|
secret_key: ${{ secrets.SECRET_KEY }}
|
|
|
|
bucket: ${{ secrets.BUCKET }}
|
|
|
|
region: ap-shanghai
|