-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (46 loc) · 1.38 KB
/
build-publish.yml
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
50
51
52
53
54
55
56
57
name: build & publish
on:
push:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16.20.1
- name: Build
run: |
npm install
npm run build
- uses: pnpm/action-setup@v3
with:
version: 8
run_install: |
- cwd: ./Ceobe-Link
- name: Build link
run: |
pnpm install
pnpm build
working-directory: ./Ceobe-Link
- name: merge
run: cp -r ./Ceobe-Link/dist ./dist/link
- name: Upload COS
uses: zkqiang/[email protected]
with:
args: delete -r -f / && upload -r ./dist/ /
secret_id: ${{ secrets.TENCENT_SECRET_ID }}
secret_key: ${{ secrets.TENCENT_SECRET_KEY }}
bucket: ${{ secrets.TENCENT_BUCKET }}
region: ap-nanjing
# https://github.com/marketplace/actions/tencent-cloud-cdn-purge-cache
# https://cloud.tencent.com/document/product/228/37871
- name: Refresh Tencent Cloud CDN Purge Cache
uses: izackwu/[email protected]
env:
SECRET_ID: ${{ secrets.TENCENT_SECRET_ID }}
SECRET_KEY: ${{ secrets.TENCENT_SECRET_KEY }}
PATHS: "https://www.ceobecanteen.top, https://ceobecanteen.top"
FLUSH_TYPE: "flush" # optional