This commit is contained in:
@@ -8,9 +8,33 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Debug runner
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
|
||||||
|
- name: Cache dependencies
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-
|
||||||
|
|
||||||
|
- name: Install Hexo dependencies
|
||||||
|
run: npm install
|
||||||
|
|
||||||
|
- name: Build Hexo
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Deploy to HTML directory
|
||||||
run: |
|
run: |
|
||||||
echo "runner ok"
|
rm -rf /home/ubuntu/html/*
|
||||||
node -v
|
cp -r public/* /home/ubuntu/html/
|
||||||
npm -v
|
echo "✅ 构建完成!"
|
||||||
|
ls -la /home/ubuntu/html/
|
||||||
Reference in New Issue
Block a user