Skip to content

Commit

Permalink
feat: add example for teo
Browse files Browse the repository at this point in the history
  • Loading branch information
YunYouJun committed Jan 1, 2025
1 parent 75c9157 commit 48242f3
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
github:
- YunLeFun
- YunYouJun
47 changes: 47 additions & 0 deletions .github/workflows/teo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# reference for Tencent EdgeOne Purge
name: TEO Purge

on:
push:
branches:
- main

pull_request:
branches:
- main

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'

# https://console.cloud.tencent.com/edgeone/zones
# DO NOT purge_host 允许旧流量缓存,缓存时间在 Tencent Cloud EdgeOne 规则中设置
# 只清楚入口 URL
# https://cloud.tencent.com/document/product/1552/80703
- name: Purge TEO
# 目录刷新 — 仅刷新目录下发生变更的资源
run: tccli teo CreatePurgeTask --ZoneId $ZONE_ID --Type purge_prefix --Targets '["https://www.yunyoujun.cn/"]'
env:
ZONE_ID: zone-32usfya3lb5o
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
# .github
: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

:octocat: The default community health files for GitHub

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).

## LICENSE

[YunLeFun](https://github.com/YunLeFun)

0 comments on commit 48242f3

Please sign in to comment.