Add cover of thubg (#11) #89
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: Purge CDN Cache | |
on: [push, workflow_dispatch] | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
lfs: 'true' | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install tencentcloud-sdk-python | |
run: | | |
pip install tencentcloud-sdk-python coscmd | |
- name: Configure coscmd | |
env: | |
secret_id: ${{ secrets.SecretId }} | |
secret_key: ${{ secrets.SecretKey }} | |
bucket: ${{ secrets.BUCKET }} | |
region: ${{ secrets.REGION }} | |
run: coscmd config -a $secret_id -s $secret_key -b $bucket -r $region | |
- name: Upload to Tencent COS | |
run: | | |
rm -r .git | |
coscmd upload -rs --delete --yes . / | |
- name: Purge CDN Cache | |
env: | |
SecretId: ${{ secrets.SecretId }} | |
SecretKey: ${{ secrets.SecretKey }} | |
run: | | |
python .github/cdn.py |