name: Continuous Integration #action名称 on: [push] #在推送的时候运行此action jobs: build_job: runs-on: ubuntu-latest #运行环境 name: build steps: # check out the repository - name: Checkout uses: actions/checkout@v2 #这里使用了github官方提供的action,checkout项目到虚拟机上 - name: Install Dependencies run: yarn - name: Build 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