赞
踩
使用actions中的re-run jobs,并启用调试功能,运行faild jobs,然后可以看到如下输出报错内容:
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20
building中运行的内容出错
Start building sites …
hugo v0.123.3-a75a659f6fc0cb3a52b2b2ba666a81f79a459376+extended linux/amd64 BuildDate=2024-02-23T17:09:20Z VendorInfo=gohugoio
ERROR render of "section" failed: "/tmp/hugo_cache_runner/modules/filecache/modules/pkg/mod/github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5@v5.8.1-0.20230812165002-59b648791d3f/layouts/_default/baseof.html:11:403": execute of template failed: template: book/list.html:11:403: executing "book/list.html" at <.File.UniqueID>: can't evaluate field File in type *source.File
根据第二个链接内容提示,猜测actions/checkout@v4这个版本可能有问题,然后将v3修改成v4,重新commit,依然报错。再观察报错内容,发现运行hugo v0.123.3-之后出现错误,猜测可能是hugo版本升级,导致有些内容不匹配。
接着修改hugo的版本:
hugo-version: "latest"
修改为:
hugo-version: '0.119.0'
修改后,重新commit,action正常工作,但是还是会有一个warning
1 warning
hugo-auto-deploy
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, peaceiris/actions-hugo@v2, peaceiris/actions-gh-pages@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
查看warning对应内容,可以看到如下说明:
Node 16 has reached its end of life, prompting us to initiate its deprecation process for GitHub Actions. Our plan is to transition all actions to run on Node 20 by Spring 2024. We will actively monitor the migration's progress and gather community feedback before finalizing the transition date. **Starting October 23rd, workflows containing actions running on Node 16 will display a warning to alert users about the upcoming migration.**
说明actions/checkout@v3, peaceiris/actions-hugo@v2, peaceiris/actions-gh-pages@v3.这些版本需要更新和升级了。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。