Files
hexo/.gitea/workflows/build.yml
魏风 e07e1589f8
All checks were successful
Build Hexo Site / build (push) Successful in 2m55s
test6
2026-03-10 22:20:08 +08:00

30 lines
680 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Build Hexo Site
on:
push:
branches: [main, master]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
# 不加 container直接用宿主机的 node v22
steps:
- name: Checkout code
run: |
git clone "http://172.17.0.1:3000/${{ github.repository }}.git" .
git checkout "${{ github.sha }}"
- name: Install dependencies
run: npm install
- name: Build Hexo
run: npm run build
- name: Deploy to HTML directory
run: |
rm -rf /home/ubuntu/html/*
cp -r public/* /home/ubuntu/html/
echo "✅ 构建完成!"
ls -la /home/ubuntu/html/