Skip to content

common add 20250414 #28

common add 20250414

common add 20250414 #28

Workflow file for this run

name: Deploy Hexo to GitHub Pages
on:
push:
branches:
- main # 监听的分支,根据需要修改
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16' # 使用的 Node.js 版本
- name: Install dependencies
run: npm install
- name: Generate static files
run: npx hexo generate
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.PERSONAL_TOKEN }}
publish_dir: ./public
publish_branch: gh-pages # 指定部署的分支