Skip to content

feat: adjust special color #55

feat: adjust special color

feat: adjust special color #55

name: Build and Deploy
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
with:
persist-credentials: false
- name: Cache Node Dependencies 🎶
id: cache
uses: actions/cache@v3
with:
path: |
.pnp.*
.yarn/cache
key: ${{runner.OS}}-yarn-caches-${{ hashFiles('yarn.lock') }}
- name: Create env file 🍕
run: |
touch .env
echo POST_MOOGLE_API="${{ secrets.POST_MOOGLE_API }}" >> .env
echo POST_MOOGLE_NATS="${{ secrets.POST_MOOGLE_NATS }}" >> .env
- name: Install and Build 🔧
run: |
yarn install
yarn build
- name: Upload artifact 🎁
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/
- name: Deploy to Github Pages 🚀
if: github.ref == 'refs/heads/master'
uses: JamesIves/github-pages-deploy-action@4.1.0
with:
branch: gh-pages
folder: dist
clean: true
deploy-tencent-cloud:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Deploy to TencentCloud 🚀
uses: TencentCloud/cos-action@v1
with:
secret_id: ${{ secrets.COS_SECRET_ID }}
secret_key: ${{ secrets.COS_SECRET_KEY }}
cos_bucket: ${{ secrets.COS_BUCKET }}
cos_region: 'ap-chengdu'
local_path: dist
clean: true
- name: Purge CDN Cache
uses: TencentCloud/cli-action@v1
with:
secret_id: ${{ secrets.TENCENT_CDN_SECRET_ID }}
secret_key: ${{ secrets.TENCENT_CDN_SECRET_KEY }}
region: 'ap-chengdu'
commands: cdn PurgeUrlsCache --cli-unfold-argument --Urls 'https://matcha-overlay.ffcafe.cn/'
output_format: json