-
Notifications
You must be signed in to change notification settings - Fork 14
42 lines (34 loc) · 1.03 KB
/
main.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
name: build & publish
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, 'build')
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.0.0
- name: Build
run: |
npm install
npm run build
- name: Upload COS
uses: zkqiang/[email protected]
with:
args: delete -r -f / && upload -r ./dist/ /
secret_id: ${{ secrets.COS_SECRET_ID }}
secret_key: ${{ secrets.COS_SECRET_KEY }}
bucket: ${{ secrets.COS_BUCKET_PROD }}
region: ap-beijing
timeout-minutes: 3
- name: Refresh Tencent Cloud CDN Purge Cache
uses: keithnull/[email protected]
env:
SECRET_ID: ${{ secrets.COS_SECRET_ID}}
SECRET_KEY: ${{ secrets.COS_SECRET_KEY }}
PATHS: "https://ark.yituliu.cn/"
FLUSH_TYPE: "flush" # optional