Skip to content

Commit

Permalink
chore: stop uploading media and pdf to aws (pingcap#12896) (pingcap#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Feb 7, 2023
1 parent 3aa5a1a commit e9714a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/media.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Upload media files to Qiniu and Aws when they change
name: Upload media files to Qiniu when they change
on:
push:
branches:
Expand Down Expand Up @@ -27,10 +27,10 @@ jobs:
unzip qshell.zip
sudo mv qshell-linux-x64-v2.4.1 /usr/local/bin/qshell
qshell account ${{ secrets.QINIU_ACCESS_KEY }} ${{ secrets.QINIU_SECRET_KEY }} test
- name: Configure awscli
run: |
pip3 install --upgrade setuptools
pip3 install awscli
printf "%s\n" ${{ secrets.AWS_ACCESS_KEY }} ${{ secrets.AWS_SECRET_KEY }} ${{ secrets.AWS_REGION }} "json" | aws configure
#- name: Configure awscli
# run: |
# pip3 install --upgrade setuptools
# pip3 install awscli
# printf "%s\n" ${{ secrets.AWS_ACCESS_KEY }} ${{ secrets.AWS_SECRET_KEY }} ${{ secrets.AWS_REGION }} "json" | aws configure
- name: Upload
run: cloud-assets-utils verify-and-sync -qiniu true -qiniu-bucket ${{ secrets.QINIU_BUCKET_NAME }} -aws true -aws-bucket ${{ secrets.AWS_BUCKET_NAME }} media -replace-first-path-to images/docs-cn -cdn-refresh https://download.pingcap.com/
run: cloud-assets-utils verify-and-sync -qiniu true -qiniu-bucket ${{ secrets.QINIU_BUCKET_NAME }} media -replace-first-path-to images/docs-cn -cdn-refresh https://download.pingcap.com/
2 changes: 1 addition & 1 deletion scripts/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def upload_to_aws(local_file, remote_name=None):
local_file = sys.argv[1]
remote_name = sys.argv[2]
print(local_file, remote_name)
upload_to_aws(local_file, remote_name)
#upload_to_aws(local_file, remote_name)
upload_to_qiniu(local_file, remote_name)

print("https://download.pingcap.org/{}".format(remote_name))

0 comments on commit e9714a2

Please sign in to comment.