update&build(干员调查):暂时隐藏官方导入 #567
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |