test6
All checks were successful
Build Hexo Site / build (push) Successful in 2m55s

This commit is contained in:
魏风
2026-03-10 22:20:08 +08:00
parent fdc36f1de4
commit e07e1589f8

View File

@@ -8,21 +8,23 @@ on:
jobs:
build:
runs-on: ubuntu-latest
# 不加 container直接用宿主机的 node v22
steps:
- name: Checkout
- name: Checkout code
run: |
git clone "http://gitea:3000/${{ gitea.repository }}.git" .
git checkout "${{ gitea.sha }}"
git clone "http://172.17.0.1:3000/${{ github.repository }}.git" .
git checkout "${{ github.sha }}"
- name: Install Node.js & Build
run: |
node -v
npm install
npm run build
- name: Install dependencies
run: npm install
- name: Deploy
- 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/