An open API service indexing awesome lists of open source software.

https://github.com/afeiship/action-deploy2cos

Github action for deploy to tencent cos.
https://github.com/afeiship/action-deploy2cos

action cloud cos deploy github tencent tx

Last synced: 4 months ago
JSON representation

Github action for deploy to tencent cos.

Awesome Lists containing this project

README

          

# action-deploy2cos
> A composite steps for deploy frontend filesto cos.

## usage
1. set secret `gh secret set -f ~/.aliyun/.env.kubebio`
2. use below workflow
```yml
name: deploy2cos workflow
on:
push:
branches: master

jobs:
Release:
name: Release
runs-on: ubuntu-latest
env:
COS_YML: ${{ secrets.COS_YML }}

if: contains(github.event.head_commit.message, '__@production__')
steps:
- name: All in one
uses: afeiship/action-deploy2cos@master
with:
build_dist: "build"
oss_bucket: cos://your-cos/test/

- name: Debug
run: |
printenv
```

## for multiple envs

```yml
name: moban-admin workflow for AliyunOSS
on: [push]
jobs:
beta:
runs-on: ubuntu-latest
env:
COS_YML: ${{ secrets.COS_YML }}

if: contains(github.event.head_commit.message, '__@beta__')
steps:
- name: All in one for beta
uses: afeiship/action-deploy2cos@master
with:
build_dist: "dist"
oss_bucket: cos://your-cos/beta/

production:
runs-on: ubuntu-latest
env:
COS_YML: ${{ secrets.COS_YML }}

if: contains(github.event.head_commit.message, '__@production__')
steps:
- name: All in one for production
uses: afeiship/action-deploy2cos@master
with:
build_dist: "dist"
oss_bucket: cos://your-cos/production/
```