Skip to content

Commit

Permalink
feat(ci): add Aliyun OSS deployment
Browse files Browse the repository at this point in the history
Explanation:
- Commented out the Tencent COS upload and CDN purge actions.
- Added a new step to deploy to Aliyun OSS using the `fangbinwei/aliyun-oss-website-action@v1` action.
- Configured the action with access credentials, bucket, endpoint, and folder options.
- Excluded the `tmp.txt` file from deployment.

This commit adds the deployment to Aliyun OSS as an alternative to Tencent COS.
  • Loading branch information
eallion committed Jan 1, 2024
1 parent 2436181 commit b2cb90f
Showing 1 changed file with 26 additions and 15 deletions.
41 changes: 26 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,30 @@ jobs:
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'

- name: Upload to Tencent COS
uses: zkqiang/[email protected]
with:
args: upload -rsf --delete ./public/ /
secret_id: ${{ secrets.SECRET_COS_ID }}
secret_key: ${{ secrets.SECRET_COS_KEY }}
bucket: ${{ secrets.COS_CN_BUCKET }}
region: ap-shanghai
# - name: Upload to Tencent COS
# uses: zkqiang/[email protected]
# with:
# args: upload -rsf --delete ./public/ /
# secret_id: ${{ secrets.SECRET_COS_ID }}
# secret_key: ${{ secrets.SECRET_COS_KEY }}
# bucket: ${{ secrets.COS_CN_BUCKET }}
# region: ap-shanghai

# - name: Tencent CDN Purge
# uses: keithnull/[email protected]
# env:
# SECRET_ID: ${{ secrets.SECRET_COS_ID }}
# SECRET_KEY: ${{ secrets.SECRET_COS_KEY }}
# PATHS: "https://kexima.com/,https://www.kexima.com/"
# FLUSH_TYPE: "delete" # optional

- name: Tencent CDN Purge
uses: keithnull/[email protected]
env:
SECRET_ID: ${{ secrets.SECRET_COS_ID }}
SECRET_KEY: ${{ secrets.SECRET_COS_KEY }}
PATHS: "https://kexima.com/,https://www.kexima.com/"
FLUSH_TYPE: "delete" # optional
- name: Deploy to Aliyun OSS
uses: fangbinwei/aliyun-oss-website-action@v1
with:
accessKeyId: ${{ secrets.ACCESS_KEY_ID }}
accessKeySecret: ${{ secrets.ACCESS_KEY_SECRET }}
bucket: kexima
endpoint: oss-cn-shanghai.aliyuncs.com
folder: public
# exclude: |
# tmp.txt

0 comments on commit b2cb90f

Please sign in to comment.