This commit is contained in:
@@ -8,21 +8,23 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# 不加 container,直接用宿主机的 node v22
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout code
|
||||||
run: |
|
run: |
|
||||||
git clone "http://gitea:3000/${{ gitea.repository }}.git" .
|
git clone "http://172.17.0.1:3000/${{ github.repository }}.git" .
|
||||||
git checkout "${{ gitea.sha }}"
|
git checkout "${{ github.sha }}"
|
||||||
|
|
||||||
- name: Install Node.js & Build
|
- name: Install dependencies
|
||||||
run: |
|
run: npm install
|
||||||
node -v
|
|
||||||
npm install
|
|
||||||
npm run build
|
|
||||||
|
|
||||||
- name: Deploy
|
- name: Build Hexo
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Deploy to HTML directory
|
||||||
run: |
|
run: |
|
||||||
rm -rf /home/ubuntu/html/*
|
rm -rf /home/ubuntu/html/*
|
||||||
cp -r public/* /home/ubuntu/html/
|
cp -r public/* /home/ubuntu/html/
|
||||||
echo "✅ 构建完成!"
|
echo "✅ 构建完成!"
|
||||||
|
ls -la /home/ubuntu/html/
|
||||||
Reference in New Issue
Block a user