qrbtf/.github/workflows/nodejs.yml

38 lines
812 B
YAML
Raw Normal View History

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:
2020-05-01 08:54:09 +00:00
CI: false
2020-05-01 06:28:55 +00:00
2020-05-01 08:09:23 +00:00
- name: Authenticate
2020-05-01 07:32:52 +00:00
run: sudo chmod 775 ./build/
2020-05-01 07:02:18 +00:00
2020-05-01 05:41:00 +00:00
- name: Upload COS
2020-05-01 07:50:27 +00:00
uses: ciaochaos/tencent-cos-action@master
2020-05-01 05:44:08 +00:00
with:
2020-05-01 07:41:50 +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 }}
2020-05-01 07:02:18 +00:00
region: ap-shanghai