-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.25 KB
/
build.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
name: build
on:
push:
tags: ["v*.*.*"]
workflow_dispatch:
concurrency:
group: "build"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build
- name: Upload to COS
uses: TencentCloud/cos-action@v1
with:
secret_id: ${{ secrets.TENCENT_SECRET_ID }}
secret_key: ${{ secrets.TENCENT_SECRET_KEY }}
cos_bucket: elion-demo-1308722423
cos_region: ap-shanghai
local_path: build
clean: true
- name: Refresh CDN
uses: TencentCloud/cli-action@v1
with:
secret_id: ${{ secrets.TENCENT_SECRET_ID }}
secret_key: ${{ secrets.TENCENT_SECRET_KEY }}
region: ap-shanghai
commands: "cdn PurgePathCache --cli-unfold-argument --Paths https://elion-demo.xhpolaris.com/ --FlushType delete"
output_format: json
- name: Send Notification
if: startsWith(github.ref, 'refs/tags')
uses: xh-polaris/send-changelog@v1
with:
webhook_url: ${{ secrets.WEBHOOK_URL }}
title: 作文辅导系统更新日志