Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behavior on github action #5166

Closed
5 tasks done
notnotype opened this issue Feb 28, 2023 · 1 comment · Fixed by #5173
Closed
5 tasks done

Unexpected behavior on github action #5166

notnotype opened this issue Feb 28, 2023 · 1 comment · Fixed by #5173

Comments

@notnotype
Copy link

notnotype commented Feb 28, 2023

Check List

Please check followings before submitting a new issue.

repo: https://github.com/notnotype/notnotype.github.io

Expected behavior

Hexo works well on my machine.
I follow the tutorial (https://hexo.io/zh-cn/docs/github-pages) to deploy GitHub Pages.
But It's seems that hexo can't detect my blog files placed in folder _posts.

INFO  Start processing
Date  Title  Path  Category  Tags
No posts.

Here is my github action file:

# pages
name: Pages

on:
  push:
    branches:
      - master # default branch

jobs:
  pages:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@v3
        with: 
          ref: master
          submodules: true  # Fetch Hugo themes (true OR recursive)
          fetch-depth: 2    # Fetch all history for .GitInfo and .Lastmod
      - name: Use Node.js 19.x
        uses: actions/setup-node@v3
        with:
          node-version: "19.x"
      - name: Cache NPM dependencies
        uses: actions/cache@v3
        with:
          path: node_modules
          key: ${{ runner.OS }}-npm-cache
          restore-keys: |
            ${{ runner.OS }}-npm-cache
      - name: Install Dependencies
        run: npm install
      - name: Build
        run: |
          ls
          ls source/_posts
          npm exec hexo clean --safe
          npm exec hexo list post --safe
          npm exec hexo g --debug --safe
      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./public

Here is what Github action inputs

_config.butterfly.yml
_config.yml
node_modules
package-lock.json
package.json
pnpm-lock.yaml
scaffolds
source
themes
74IC
74IC.md
_ljsex.md
github-action-初体验
github-action-初体验.md
hello-world.md
hexo-typora的博客体验
hexo-typora的博客体验.md
images
mc-server-local-ip-network-accelerate
mc-server-local-ip-network-accelerate.md
test-butterfly.md
test-post-asset-folder.md
...
INFO  Validating config
INFO  Validating config
INFO  Start processing
Date  Title  Path  Category  Tags
No posts.
INFO  Validating config
INFO  Start processing
INFO  Files loaded in 71 ms
INFO  Generated: fancybox/jquery.fancybox.min.css
INFO  Generated: js/script.js
INFO  Generated: css/fonts/FontAwesome.otf
INFO  Generated: css/style.css
INFO  Generated: fancybox/jquery.fancybox.min.js
INFO  Generated: js/jquery-3.4.1.min.js
INFO  Generated: css/fonts/fontawesome-webfont.eot
INFO  Generated: css/fonts/fontawesome-webfont.ttf
INFO  Generated: css/fonts/fontawesome-webfont.woff
INFO  Generated: css/images/banner.jpg
INFO  Generated: css/fonts/fontawesome-webfont.woff2
INFO  Generated: css/fonts/fontawesome-webfont.svg
INFO  12 files generated in 2[9](https://github.com/notnotype/notnotype.github.io/actions/runs/4291501269/jobs/7476764654#step:5:10)2 ms

How to reproduce?

https://github.com/notnotype/notnotype.github.io/actions/runs/4291501269/jobs/7476764654

Is the problem still there under "Safe mode"?

Yes, I also tried to change the theme to the default theme

Environment & Settings

Node.js & npm version(node -v && npm -v)

node: 19.7
npm: 9.5.0

Hexo and Plugin version(npm ls --depth 0)

hexo-site@0.0.0 /mnt/d/Notype/CodeRepositories/GitHub/notnotype.github.io
├── @renbaoshuo/markdown-it-katex@2.0.2
├── hexo-generator-archive@2.0.0
├── hexo-generator-category@2.0.0
├── hexo-generator-index@3.0.0
├── hexo-generator-tag@2.0.0
├── hexo-renderer-ejs@2.0.0
├── hexo-renderer-markdown-it@7.0.0
├── hexo-renderer-pug@3.0.0
├── hexo-renderer-stylus@2.1.0
├── hexo-server@3.0.0
├── hexo-theme-landscape@0.0.3
├── hexo@6.3.0
└── katex@0.16.4

Your package.json package.json

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "build": "hexo generate",
    "clean": "hexo clean",
    "deploy": "hexo deploy",
    "server": "hexo server"
  },
  "hexo": {
    "version": "6.3.0"
  },
  "dependencies": {
    "@renbaoshuo/markdown-it-katex": "^2.0.2",
    "hexo": "^6.3.0",
    "hexo-generator-archive": "^2.0.0",
    "hexo-generator-category": "^2.0.0",
    "hexo-generator-index": "^3.0.0",
    "hexo-generator-tag": "^2.0.0",
    "hexo-renderer-ejs": "^2.0.0",
    "hexo-renderer-markdown-it": "^7.0.0",
    "hexo-renderer-pug": "^3.0.0",
    "hexo-renderer-stylus": "^2.1.0",
    "hexo-server": "^3.0.0",
    "hexo-theme-landscape": "^0.0.3",
    "katex": "^0.16.4"
  }
}

Others

@notnotype
Copy link
Author

solved: _posts folder contain a symbolic link. just delete it and run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant