Skip to content

Commit

Permalink
Update pages.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
obsidian-zero committed Dec 3, 2024
1 parent 0849ca6 commit 570e265
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Pages
on:
push:
branches:
- main # default branch
- main # default branch

jobs:
build:
Expand All @@ -12,7 +12,6 @@ jobs:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
# If your repository depends on submodule, please see: https://github.com/actions/checkout
submodules: recursive
- name: Use Node.js 20.x
uses: actions/setup-node@v4
Expand All @@ -27,12 +26,15 @@ jobs:
${{ runner.OS }}-npm-cache
- name: Install Dependencies
run: npm install
- name: Ensure Hexo has execute permissions
run: chmod +x node_modules/.bin/hexo # 确保 Hexo 可以执行
- name: Build
run: npm run build
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public

deploy:
needs: build
permissions:
Expand All @@ -45,4 +47,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4

0 comments on commit 570e265

Please sign in to comment.