Skip to content

Init commit

Init commit #42

Workflow file for this run

name: Hexo Deploy
on:
push:
branches:
- main
jobs:
build-blog:
runs-on: ubuntu-latest
steps:
- name: 签出仓库
uses: actions/checkout@v4
with:
ref: main
- name: 签出主题仓库
uses: actions/checkout@v4
with:
repository: jerryc127/hexo-theme-butterfly
path: themes/butterfly
- name: 安装Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: 设置包缓存目录
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.OS }}-npm-cache
restore-keys: ${{ runner.OS }}-npm-cache
- name: 安装依赖
run: npm install
- name: 构建
run: npm run build
- name: 上传构建产物
uses: actions/upload-pages-artifact@v3
with:
path: ./public