Skip to content

update articles

update articles #204

Workflow file for this run

name: Deploy Hexo
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check Out
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v3
with:
version: latest
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install Dependencies
run: |
pnpm install
# https://github.com/zhullyb/zhullyb.github.io/blob/master/.github/workflows/deploy.yml
# 修复 hexo 生成的文件更新时间 为当前时间,实际应为提交时间
- name: Fix File Updated Date
run: |
git ls-files "*.md" | while read filepath; do touch -d "$(git log -1 --format='@%ct' $filepath)" "$filepath" && echo "Fixed: $filepath"; done
- name: Build Site
run: |
pnpm build
- name: Move baidu_verify
run: |
cp asset/baidu_verify_codeva-GwRsL4VPtx.html.html public/
cp asset/naver57322dd0ed14599dd3052c79c6892766.html public/
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: public
force_orphan: true