abnerwei / hexo-url-submission

Quickly submit new post URLs to Google, Bing, and Baidu search engines to improve the quality and speed of website inclusion
https://abnerwei.com/wiki/hexo/url-submission
MIT License
36 stars 5 forks source link

本地正常,github action失败ERROR url_submission: Extract url file failed. Cancel inclusion submission... #9

Closed lizilong1993 closed 1 year ago

lizilong1993 commented 1 year ago

如题,本地正常

INFO  Deploying: url_submission
WARN  url_submission: (baidu) The number of entries submitted by Baidu Search has been set to 4
INFO  url_submission: (baidu) Start submit urlList to baidu engine...
INFO  url_submission: (baidu) Submit to baidu engine success: [success: 4, remain: 2977]
INFO  url_submission: (bing) Get bing engine remain, [daliy: 81, monthly: 2281]
WARN  url_submission: (bing) The number of entries submitted by Bing Search has been set to 4
INFO  url_submission: (bing) Start submit urlList to bing engine...
INFO  url_submission: (bing) Submit to bing engine success.
WARN  url_submission: (shenma) The number of entries submitted by ShenMa Search has been set to 4
INFO  url_submission: (shenma) Start submit urlList to shenma engine...
INFO  url_submission: (shenma) Submit to shenma engine success.
WARN  url_submission: (google) The number of entries submitted by Google Search has been set to 4
INFO  url_submission: (google) Start submit urlList to google engine...
INFO  url_submission: (google) Submit to google engine success
INFO  url_submission: (google) Google Sitemap Notification Received.

Github Action报错ERROR

INFO  Deploying: url_submission
ERROR url_submission: Extract url file failed. Cancel inclusion submission...
INFO  Deploy done: url_submission

我的Github Action脚本如下:

[Skip to content](https://github.com/lizilong1993/lizilong1993.github.io/actions/runs/4103899845/workflow#start-of-content)
Search or jump to…
[Pull requests](https://github.com/pulls)
[Issues](https://github.com/issues)
[Codespaces](https://github.com/codespaces)
[Marketplace](https://github.com/marketplace)
[Explore](https://github.com/explore)

@[lizilong1993](https://github.com/lizilong1993) 
lizilong1993
/
[lizilong1993.github.io](https://github.com/lizilong1993/lizilong1993.github.io)
Private
Cannot fork because you own this repository and are not a member of any organizations.
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Settings
自动部署
test deploy #38
Jobs
Run details
Workflow file for this run
.github/workflows/autodeploy.yml at 2c59303
# 当有改动推送到master分支时,启动Action
name: 自动部署

on:
  push:
    branches:
      - main #2020年10月后github新建仓库默认分支改为main,注意更改
  schedule:
    - cron: "0 2 * * *" # 每天凌晨2点自动执行

  release:
    types:
      - published

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: 检查分支
        uses: actions/checkout@v3
        with:
          ref: main #2020年10月后github新建仓库默认分支改为main,注意更改

      - name: 安装 Node
        uses: actions/setup-node@v3
        with:
          node-version: "16.15.1" #action使用的node版本,建议大版本和本地保持一致。可以在本地用node -v查询版本号。

      - name: 安装 Hexo
        run: |
          export TZ='Asia/Shanghai'
          npm install hexo-cli -g
      - name: 缓存 Hexo
        uses: actions/cache@v3
        id: cache
        with:
          path: node_modules
          key: ${{runner.OS}}-${{hashFiles('**/package-lock.json')}}

      - name: 安装依赖
        if: steps.cache.outputs.cache-hit != 'true'
        run: |
          npm install gulp-cli -g
          npm install --save
      - name: 生成静态文件
        run: |
          hexo clean
          hexo generate
          hexo bangumi -u # 番剧
          hexo cinema -u  # 追剧
          gulp
          hexo algolia
          hexo deploy
      - name: 部署到Github Pages #此处master:master 指从本地的master分支提交到远程仓库的master分支,若远程仓库没有对应分支则新建一个。如有其他需要,可以根据自己的需求更改。
        run: |
          cd ./public
          git init
          git config --global user.name '${{ secrets.GITHUBUSERNAME }}'
          git config --global user.email '${{ secrets.GITHUBEMAIL }}'
          git add .
          git commit -m "${{ github.event.head_commit.message }} $(date +"%Z %Y-%m-%d %A %H:%M:%S") Updated By Github [Actions](https://github.com/lizilong1993/lizilong1993.github.io/actions)"
          git push --force --quiet "https://${{ secrets.GITHUBUSERNAME }}:${{ secrets.GITHUBTOKEN }}@github.com/${{ secrets.GITHUBUSERNAME }}/${{ secrets.GITHUBUSERNAME }}.github.io.git" master:gh-pages
test deploy · lizilong1993/lizilong1993.github.io@[2c59303](https://github.com/lizilong1993/lizilong1993.github.io/commit/2c593039b16feb7fb023fb5caa9545e12eb51091)
lizilong1993 commented 1 year ago

求助

abnerwei commented 1 year ago

如题,本地正常

INFO  Deploying: url_submission
WARN  url_submission: (baidu) The number of entries submitted by Baidu Search has been set to 4
INFO  url_submission: (baidu) Start submit urlList to baidu engine...
INFO  url_submission: (baidu) Submit to baidu engine success: [success: 4, remain: 2977]
INFO  url_submission: (bing) Get bing engine remain, [daliy: 81, monthly: 2281]
WARN  url_submission: (bing) The number of entries submitted by Bing Search has been set to 4
INFO  url_submission: (bing) Start submit urlList to bing engine...
INFO  url_submission: (bing) Submit to bing engine success.
WARN  url_submission: (shenma) The number of entries submitted by ShenMa Search has been set to 4
INFO  url_submission: (shenma) Start submit urlList to shenma engine...
INFO  url_submission: (shenma) Submit to shenma engine success.
WARN  url_submission: (google) The number of entries submitted by Google Search has been set to 4
INFO  url_submission: (google) Start submit urlList to google engine...
INFO  url_submission: (google) Submit to google engine success
INFO  url_submission: (google) Google Sitemap Notification Received.

Github Action报错ERROR

INFO  Deploying: url_submission
ERROR url_submission: Extract url file failed. Cancel inclusion submission...
INFO  Deploy done: url_submission

我的Github Action脚本如下:

[Skip to content](https://github.com/lizilong1993/lizilong1993.github.io/actions/runs/4103899845/workflow#start-of-content)
Search or jump to…
[Pull requests](https://github.com/pulls)
[Issues](https://github.com/issues)
[Codespaces](https://github.com/codespaces)
[Marketplace](https://github.com/marketplace)
[Explore](https://github.com/explore)

@[lizilong1993](https://github.com/lizilong1993) 
lizilong1993
/
[lizilong1993.github.io](https://github.com/lizilong1993/lizilong1993.github.io)
Private
Cannot fork because you own this repository and are not a member of any organizations.
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Settings
自动部署
test deploy #38
Jobs
Run details
Workflow file for this run
.github/workflows/autodeploy.yml at 2c59303
# 当有改动推送到master分支时,启动Action
name: 自动部署

on:
  push:
    branches:
      - main #2020年10月后github新建仓库默认分支改为main,注意更改
  schedule:
    - cron: "0 2 * * *" # 每天凌晨2点自动执行

  release:
    types:
      - published

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: 检查分支
        uses: actions/checkout@v3
        with:
          ref: main #2020年10月后github新建仓库默认分支改为main,注意更改

      - name: 安装 Node
        uses: actions/setup-node@v3
        with:
          node-version: "16.15.1" #action使用的node版本,建议大版本和本地保持一致。可以在本地用node -v查询版本号。

      - name: 安装 Hexo
        run: |
          export TZ='Asia/Shanghai'
          npm install hexo-cli -g
      - name: 缓存 Hexo
        uses: actions/cache@v3
        id: cache
        with:
          path: node_modules
          key: ${{runner.OS}}-${{hashFiles('**/package-lock.json')}}

      - name: 安装依赖
        if: steps.cache.outputs.cache-hit != 'true'
        run: |
          npm install gulp-cli -g
          npm install --save
      - name: 生成静态文件
        run: |
          hexo clean
          hexo generate
          hexo bangumi -u # 番剧
          hexo cinema -u  # 追剧
          gulp
          hexo algolia
          hexo deploy
      - name: 部署到Github Pages #此处master:master 指从本地的master分支提交到远程仓库的master分支,若远程仓库没有对应分支则新建一个。如有其他需要,可以根据自己的需求更改。
        run: |
          cd ./public
          git init
          git config --global user.name '${{ secrets.GITHUBUSERNAME }}'
          git config --global user.email '${{ secrets.GITHUBEMAIL }}'
          git add .
          git commit -m "${{ github.event.head_commit.message }} $(date +"%Z %Y-%m-%d %A %H:%M:%S") Updated By Github [Actions](https://github.com/lizilong1993/lizilong1993.github.io/actions)"
          git push --force --quiet "https://${{ secrets.GITHUBUSERNAME }}:${{ secrets.GITHUBTOKEN }}@github.com/${{ secrets.GITHUBUSERNAME }}/${{ secrets.GITHUBUSERNAME }}.github.io.git" master:gh-pages
test deploy · lizilong1993/lizilong1993.github.io@[2c59303](https://github.com/lizilong1993/lizilong1993.github.io/commit/2c593039b16feb7fb023fb5caa9545e12eb51091)

您好,可以麻烦贴一下 Action 的博客url列表产物么?例如:submit_url.txt 等,这个取决于你的 urls_path配置

lizilong1993 commented 1 year ago

image 我好像发现问题了,在本地能生成txt,在远端不行。是我哪里没配置好吗?还是butterfly生成的markdown需要手动插入updated这个front-matter呢?

lizilong1993 commented 1 year ago

image 我好像发现问题了,在本地能生成txt,在远端不行。是我哪里没配置好吗?还是butterfly生成的markdown需要手动插入updated这个front-matter呢?


好像加了updated也不行

abnerwei commented 1 year ago

image 我好像发现问题了,在本地能生成txt,在远端不行。是我哪里没配置好吗?还是butterfly生成的markdown需要手动插入updated这个front-matter呢?

好像加了updated也不行 68747470733a2f2f7477696b6f6f2d6d616769632e6f73732d636e2d68616e677a686f752e616c6979756e63732e636f6d2f51512f67616e67612e676966

updated 没关系,主要是取一个 pagesposts 集合文件

lizilong1993 commented 1 year ago

image image 这是我的部分log。

abnerwei commented 1 year ago

看 log 还是 urlList文件没有生成,或者根据配置的路径没有获取到