qrbtf/.github/workflows/nodejs.yml

26 lines
807 B
YAML
Raw Normal View History

2020-05-01 05:11:42 +00:00
name: Continuous Integration #action名称
on: [push] #在推送的时候运行此action
2020-05-01 05:05:10 +00:00
jobs:
2020-05-01 05:11:42 +00:00
build_job:
runs-on: ubuntu-latest #运行环境
name: build
2020-05-01 05:05:10 +00:00
steps:
2020-05-01 05:11:42 +00:00
# check out the repository
- name: Checkout
uses: actions/checkout@v2 #这里使用了github官方提供的action,checkout项目到虚拟机上
- name: Install Dependencies
run: yarn
- name: Build
2020-05-01 05:41:00 +00:00
run: yarn build
# 使用云开发 Github Action 部署
- name: Upload COS
uses: zkqiang/tencent-cos-action@master
with:
args: delete -r -f / && upload -r ./dist/ /
secret_id: ${{ secrets.SECRET_ID }}
secret_key: ${{ secrets.SECRET_KEY }}
bucket: ${{ secrets.BUCKET }}
region: ap-shanghai