-
Notifications
You must be signed in to change notification settings - Fork 60
49 lines (40 loc) · 1.23 KB
/
cos.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: update to cos
on:
push:
branches:
- master
jobs:
build:
if: github.repository == 'camera-2018/hdu-cs-wiki'
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.13.1'
- name: install doc dependencies
run: sudo npm i
- name: build
run: |
npm run docs:build
- name: install coscmd and tccli
run: |
sudo pip3 install coscmd
sudo pip3 install tccli
- name: confirgure coscmd and tccli
env:
SECRET_ID: ${{ secrets.TCLOUD_API_ID }}
SECRET_KEY: ${{ secrets.TCLOUD_API_KEY }}
BUCKET: hdu-cs-wiki-1307923872
REGION: ap-shanghai
run: |
coscmd config -a $SECRET_ID -s $SECRET_KEY -b $BUCKET -r $REGION -m 10 -p 5
tccli configure set secretId $SECRET_ID
tccli configure set secretKey $SECRET_KEY
tccli configure set region $REGION
- name: upload and refresh cdn
run: |
coscmd upload -rfs --delete ./.vitepress/dist/ /
tccli cdn PurgePathCache --cli-unfold-argument --Paths https://wiki.xyxsw.site/ --FlushType flush