Skip to content

fix: 切换到Github Pages #149

fix: 切换到Github Pages

fix: 切换到Github Pages #149

Workflow file for this run

name: Hexo Deploy
on:
push:
branches:
- blog
jobs:
build:
name: NPM Install & Hexo Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Setup NPM & Hexo environment
run: |
npm install hexo-cli -g
npm ci
- name: Hexo generate & Deploy To Github Pages
run: |
hexo clean
hexo douban -bm
hexo generate
hexo deploy
# - name: Setup ossutil
# uses: manyuanrong/[email protected]
# with:
# endpoint: "oss-cn-hongkong.aliyuncs.com"
# access-key-id: ${{ secrets.ALIBABA_CLOUD_ACCESS_KEY_ID }}
# access-key-secret: ${{ secrets.ALIBABA_CLOUD_ACCESS_KEY_SECRET }}
# - name: Deply To OSS
# run: |
# ossutil cp -r -u -j 24 public oss://lyz05blog/
notification:
name: Notify
runs-on: ubuntu-latest
needs: [build]
if: always()
env:
key: ${{ secrets.sckey }}
failure: 博客部署失败
cancelled: 博客部署被取消
success: 博客部署成功
steps:
- uses: martialonline/workflow-status@v3
id: check
- run: curl -d "title=$failure&content=$failure" "http://www.pushplus.plus/send/$key"
if: steps.check.outputs.status == 'failure'
- run: curl -d "title=$cancelled&content=$cancelled" "http://www.pushplus.plus/send/$key"
if: steps.check.outputs.status == 'cancelled'
- run: curl -d "title=$success&content=$success" "http://www.pushplus.plus/send/$key"
if: steps.check.outputs.status == 'success'