Merge pull request #40 from Ronchy2000/master #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload to COS | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Install coscmd | |
run: sudo pip install coscmd | |
- name: Configure coscmd | |
env: | |
SECRET_ID: ${{ secrets.SecretId }} | |
SECRET_KEY: ${{ secrets.SecretKey }} | |
BUCKET: sicnu-docs-1318005116 | |
REGION: ap-chengdu | |
run: coscmd config -a $SECRET_ID -s $SECRET_KEY -b $BUCKET -r $REGION | |
- name: Upload | |
# 同步上传文件,忽略 .git文件,以及Img文件中的内容,Img文件可通过Picgo直接上传至腾讯云COS图床 | |
# run: coscmd upload -rf -s --delete ./docs/ / --ignore docs/Img/*,.git/* | |
run: coscmd upload -rf -s ./docs/ / --ignore docs/Img/*,.git/* |