Github Action 自动部署报错
Pengyang233 opened this issue · comments
zthxxx您好
我本地使用wikitten主题,手动$ hexo d
是没有问题的,无报错,可以正常部署到github pages上。
但是如果尝试使用Github Action进行自动部署(我是按照这个教程来的),就会报错,报错信息很长,我只截取了一部分,在下面。
另外,如果换成默认主题,就能正常使用 Github Action 进行自动部署。
看了半天没有想清楚问题出在哪,还望您能解答一下,多谢!
INFO Start processing
INFO Files loaded in 377 ms
ERROR /home/runner/work/wiki-source/wiki-source/themes/Wikitten/layout/page.ejs:1
>> 1| <%- partial('common/article', {post: page, index: false}) %>
/home/runner/work/wiki-source/wiki-source/themes/Wikitten/layout/common/article.ejs:80
78|
79| <% if (!index) { %>
>> 80| <%- partial('comment/index') %>
81| <% } %>
82|
83| <% if (!index){ %>
/home/runner/work/wiki-source/wiki-source/themes/Wikitten/layout/comment/index.ejs:2
1| <% if (post.comments) { %>
>> 2| <% if (theme.comment.disqus) { %>
3| <section id="comments"> <%- partial('comment/disqus') %> </section>
4| <% } else if (theme.comment.duoshuo) { %>
5| <section id="comments"> <%- partial('comment/duoshuo') %> </section>
Cannot read property 'disqus' of undefined
TypeError: /home/runner/work/wiki-source/wiki-source/themes/Wikitten/layout/page.ejs:1
>> 1| <%- partial('common/article', {post: page, index: false}) %>
/home/runner/work/wiki-source/wiki-source/themes/Wikitten/layout/common/article.ejs:80
78|
79| <% if (!index) { %>
>> 80| <%- partial('comment/index') %>
81| <% } %>
82|
83| <% if (!index){ %>
/home/runner/work/wiki-source/wiki-source/themes/Wikitten/layout/comment/index.ejs:2
1| <% if (post.comments) { %>
>> 2| <% if (theme.comment.disqus) { %>
3| <section id="comments"> <%- partial('comment/disqus') %> </section>
4| <% } else if (theme.comment.duoshuo) { %>
5| <section id="comments"> <%- partial('comment/duoshuo') %> </section>
Cannot read property 'disqus' of undefined
at eval (/home/runner/work/wiki-source/wiki-source/themes/Wikitten/layout/comment/index.ejs:13:26)
at index (/home/runner/work/wiki-source/wiki-source/node_modules/ejs/lib/ejs.js:682:17)
at viewFn._compiledSync.locals [as _compiledSync] (/home/runner/work/wiki-source/wiki-source/node_modules/hexo/lib/theme/view.js:132:22)
at viewFn.View.renderSync (/home/runner/work/wiki-source/wiki-source/node_modules/hexo/lib/theme/view.js:60:23)
at Object.partial (/home/runner/work/wiki-source/wiki-source/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
at eval (/home/runner/work/wiki-source/wiki-source/themes/Wikitten/layout/common/article.ejs:173:17)
at article (/home/runner/work/wiki-source/wiki-source/node_modules/ejs/lib/ejs.js:682:17)
at viewFn._compiledSync.locals [as _compiledSync] (/home/runner/work/wiki-source/wiki-source/node_modules/hexo/lib/theme/view.js:132:22)
at viewFn.View.renderSync (/home/runner/work/wiki-source/wiki-source/node_modules/hexo/lib/theme/view.js:60:23)
at Object.partial (/home/runner/work/wiki-source/wiki-source/node_modules/hexo/lib/plugins/helper/partial.js:34:15)
at eval (/home/runner/work/wiki-source/wiki-source/themes/Wikitten/layout/page.ejs:10:17)
at page (/home/runner/work/wiki-source/wiki-source/node_modules/ejs/lib/ejs.js:682:17)
at viewFn._compiled.locals [as _compiled] (/home/runner/work/wiki-source/wiki-source/node_modules/hexo/lib/theme/view.js:136:48)
at viewFn.View.render (/home/runner/work/wiki-source/wiki-source/node_modules/hexo/lib/theme/view.js:41:15)
at /home/runner/work/wiki-source/wiki-source/node_modules/hexo/lib/hexo/index.js:61:21
at tryCatcher (/home/runner/work/wiki-source/wiki-source/node_modules/bluebird/js/release/util.js:16:23)
at /home/runner/work/wiki-source/wiki-source/node_modules/bluebird/js/release/method.js:15:34
at RouteStream._read (/home/runner/work/wiki-source/wiki-source/node_modules/hexo/lib/hexo/router.js:126:3)
at RouteStream.Readable.read (_stream_readable.js:471:10)
at resume_ (_stream_readable.js:950:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
ERROR /home/runner/work/wiki-source/wiki-source/themes/Wikitten/layout/post.ejs:1
>> 1| <%- partial('common/article', {post: page, index: false}) %>
/home/runner/work/wiki-source/wiki-source/themes/Wikitten/layout/common/article.ejs:13
11| <%- partial('post/tag') %>
12| <%- partial('post/date', { class_name: 'article-date', date_format: null }) %>
>> 13| <% if (theme.plugins.busuanzi_count) { %>
14| <i class="fa fa-bar-chart"></i>
15| <span id="busuanzi_container_site_pv"><span id="busuanzi_value_page_pv"></span></span>
16| <% } %>
Cannot read property 'busuanzi_count' of undefined
TypeError: /home/runner/work/wiki-source/wiki-source/themes/Wikitten/layout/post.ejs:1
......(都是类似的错误)
node 版本升一下试试,我看你发的教程里是 10
另外能看 GitHub 官方文档就不建议看这篇教程,里面大量充斥着画蛇添句和不明所以
node 版本升一下试试,我看你发的教程里是 10
另外能看 GitHub 官方文档就不建议看这篇教程,里面大量充斥着画蛇添句和不明所以
感谢回复,因为我本地是10,我就没管。另外我也改成了12,依然不行,所以可能不是版本的问题。不知道大佬用了自动部署了嘛?
因为第一次接触这个action,所以查了一些教程,这个写的还算清楚,基本可以看懂。
已经很晚了,大佬也要注意身体,感谢回复
action log 链接地址贴一下我才能看下报错呀
action log 链接地址贴一下我才能看下报错呀
您说的是这个吗?
你的链接显然不是,
GitHub Actions 每次跑任务的时候会有对应任务的 log,例如 https://github.com/zthxxx/kugimiya-rainbow-fart/runs/821483131
这些都是官方文档有写,但国内辣鸡教程不会说的
你的链接显然不是,
GitHub Actions 每次跑任务的时候会有对应任务的 log,例如 https://github.com/zthxxx/kugimiya-rainbow-fart/runs/821483131
这些都是官方文档有写,但国内辣鸡教程不会说的
我是憨憨,设成了私人repo,耽误大佬时间了,请过目,请过目,在倒数第三个里报的错
谢谢zthxxx,我已经成功弄好了,感谢耐心回复,注意休息