This commit is contained in:
@@ -11,30 +11,18 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
run: |
|
||||||
|
git clone "${GITEA_SERVER_URL}/${GITHUB_REPOSITORY}.git" .
|
||||||
|
git checkout "${GITHUB_SHA}"
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Install Node.js & Build
|
||||||
uses: actions/setup-node@v4
|
run: |
|
||||||
with:
|
node -v
|
||||||
node-version: '20'
|
npm install
|
||||||
|
npm run build
|
||||||
|
|
||||||
- name: Cache dependencies
|
- name: Deploy
|
||||||
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: |
|
||||||
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