Skip to content

fix: 修复BUG

fix: 修复BUG #300

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches: ["master", "feat/布局"]
pull_request:
branches: ["master", "feat/布局"]
jobs:
build-and-upload:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: '20'
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build
- name: Configure COSCMD
if: github.event_name == 'push'
env:
COS_SECRET_ID: ${{ secrets.COS_SECRET_ID }}
COS_SECRET_KEY: ${{ secrets.COS_SECRET_KEY }}
COS_BUCKET_NAME: ${{ secrets.COS_BUCKET_NAME }}
COS_BUCKET_REGION: ${{ secrets.COS_BUCKET_REGION }}
run: |
pip install coscmd
coscmd config -a $COS_SECRET_ID -s $COS_SECRET_KEY -b $COS_BUCKET_NAME -r $COS_BUCKET_REGION
- name: Upload to COS Bucket
if: github.event_name == 'push'
env:
COS_UPLOAD_FROM_PATH: ${{ secrets.COS_UPLOAD_FROM_PATH }}
run: coscmd upload -r $COS_UPLOAD_FROM_PATH /
- name: Invalidate CDN cache
if: github.event_name == 'push'
env:
TENCENTCLOUD_SECRET_ID: ${{ secrets.TENCENT_CLOUD_SECRET_ID }}
TENCENTCLOUD_SECRET_KEY: ${{ secrets.TENCENT_CLOUD_SECRET_KEY }}
TENCENTCLOUD_REGION: ap-beijing
run: |
pip install tccli
tccli cdn PurgePathCache --cli-unfold-argument --Paths 'https://cloudmind.top/' --FlushType flush
- name: Send Change Log
if: github.event_name == 'push'
uses: xh-polaris/send-changelog@v1
with:
webhook_url: ${{ secrets.Front_WEBHOOK_URL }}
title: CloudMind前端更新日志