This commit is contained in:
@@ -11,30 +11,18 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
run: |
|
||||
git clone "${GITEA_SERVER_URL}/${GITHUB_REPOSITORY}.git" .
|
||||
git checkout "${GITHUB_SHA}"
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
- name: Install Node.js & Build
|
||||
run: |
|
||||
node -v
|
||||
npm install
|
||||
npm run build
|
||||
|
||||
- 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
|
||||
- name: Deploy
|
||||
run: |
|
||||
rm -rf /home/ubuntu/html/*
|
||||
cp -r public/* /home/ubuntu/html/
|
||||
echo "✅ 构建完成!"
|
||||
ls -la /home/ubuntu/html/
|
||||
Reference in New Issue
Block a user