Skip to content

Commit

Permalink
ci: add teo purge
Browse files Browse the repository at this point in the history
  • Loading branch information
YunYouJun committed Oct 8, 2024
1 parent 4316154 commit cfd280a
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/teo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: TEO Purge

on:
push:
branches:
- main
- valaxy

pull_request:
branches:
- main
- valaxy

jobs:
teo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm

- name: Install
run: pnpm install

- name: Install TCCLI
run: sudo pip install tccli

- name: Configure TCCLI
run: |
tccli configure set secretId ${{ secrets.TENCENT_CLOUD_SECRET_ID }}
tccli configure set secretKey ${{ secrets.TENCENT_CLOUD_SECRET_KEY }}
tccli configure set region ap-shanghai
- name: Wait Cloudflare Pages Deploy
run: echo 'Waiting for Cloudflare Pages Deploy'

- name: Purge TEO
run: tccli teo CreatePurgeTask --ZoneId zone-32usfya3lb5o --Type purge_host --Targets '["www.yunyoujun.cn"]'
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,19 @@ git clone https://github.com/YunYouJun/hexo-theme-yun themes/yun

[![Tencent Cloud](https://imgcache.qq.com/open_proj/proj_qcloud_v2/gateway/portal/css/img/nav/logo-bg-color.svg)](https://cloud.tencent.com/)

```bash
# https://cloud.tencent.com/document/product/440/111345
tccli auth login
```

#### EdgeOne 刷新缓存

```bash
# EdgeOne yunyoujun.cn
# https://cloud.tencent.com/document/product/1552/70759
tccli teo CreatePurgeTask --ZoneId zone-32usfya3lb5o --Type purge_host --Targets '["www.yunyoujun.cn"]'
```

#### 刷新目录

```bash
Expand Down

0 comments on commit cfd280a

Please sign in to comment.