Skip to content

Commit 48242f3

Browse files
committed
feat: add example for teo
1 parent 75c9157 commit 48242f3

File tree

3 files changed

+58
-1
lines changed

3 files changed

+58
-1
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
github:
2+
- YunLeFun
3+
- YunYouJun

.github/workflows/teo.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# reference for Tencent EdgeOne Purge
2+
name: TEO Purge
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
pull_request:
10+
branches:
11+
- main
12+
13+
jobs:
14+
teo:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: pnpm/action-setup@v2
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: lts/*
22+
cache: pnpm
23+
24+
- name: Install
25+
run: pnpm install
26+
27+
- name: Install TCCLI
28+
run: sudo pip install tccli
29+
30+
- name: Configure TCCLI
31+
run: |
32+
tccli configure set secretId ${{ secrets.TENCENT_CLOUD_SECRET_ID }}
33+
tccli configure set secretKey ${{ secrets.TENCENT_CLOUD_SECRET_KEY }}
34+
tccli configure set region ap-shanghai
35+
36+
- name: Wait Cloudflare Pages Deploy
37+
run: echo 'Waiting for Cloudflare Pages Deploy'
38+
39+
# https://console.cloud.tencent.com/edgeone/zones
40+
# DO NOT purge_host 允许旧流量缓存,缓存时间在 Tencent Cloud EdgeOne 规则中设置
41+
# 只清楚入口 URL
42+
# https://cloud.tencent.com/document/product/1552/80703
43+
- name: Purge TEO
44+
# 目录刷新 — 仅刷新目录下发生变更的资源
45+
run: tccli teo CreatePurgeTask --ZoneId $ZONE_ID --Type purge_prefix --Targets '["https://www.yunyoujun.cn/"]'
46+
env:
47+
ZONE_ID: zone-32usfya3lb5o

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
# .github
2-
:octocat: The default community health files for GitHub https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file#creating-a-repository-for-default-files
2+
3+
:octocat: The default community health files for GitHub
4+
5+
See [Creating a default community health file | GitHub Docs](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file#creating-a-repository-for-default-files).
6+
7+
## LICENSE
8+
9+
[YunLeFun](https://github.com/YunLeFun)

0 commit comments

Comments
 (0)