diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index e9ec989..4cd6643 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -3,7 +3,7 @@ name: Pages on: push: branches: - - main # default branch + - main # default branch jobs: build: @@ -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 @@ -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: @@ -45,4 +47,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 \ No newline at end of file + uses: actions/deploy-pages@v4