Files
hexo/.gitea/workflows/build.yml
魏风 8ac3ec5e59
All checks were successful
Build Hexo Site / build (push) Successful in 55s
test7
2026-03-10 22:46:59 +08:00

33 lines
700 B
YAML

name: Build Hexo Site
on:
push:
branches: [main, master]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
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 1Panel website
run: |
SITE_DIR="/opt/1panel/apps/openresty/openresty/www/sites/blog.makefire.fun/index"
rm -rf ${SITE_DIR}/*
cp -r public/* ${SITE_DIR}/
echo "✅ 构建完成!"
ls -la ${SITE_DIR}