Skip to content

Commit

Permalink
cl: workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lllzhmio committed Nov 12, 2024
1 parent 9cfb791 commit 1453f0e
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 3 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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: dist
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: 作文辅导系统更新日志
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
node_modules/
/.pnp
.pnp.js

# testing
/coverage

# production
/build
build/

# misc
.env
.DS_Store
.env.local
.env.development.local
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "essay_tutoring",
"name": "elion-demo",
"version": "0.1.0",
"private": true,
"dependencies": {
Expand Down

0 comments on commit 1453f0e

Please sign in to comment.