Hi all,
I’m really newbie in programming, especially in the use of git and GitHub,
I have made a blog with the quick start of the Toha theme.
Now following this guide “Deploy site in Github Pages” I’m trying to deploy it on GitHub.
The application runs locally because I have downloaded Bootstrap but when I push the blog on GitHub the actions give to me these errors.
Run hugo --minify
hugo: downloading modules …
hugo: collected modules in 2819 ms
Start building sites …
hugo v0.109.0-47b12b83e636224e5e601813ff3e6790c191e371+extended linux/amd64 BuildDate=2022-12-23T10:38:11Z VendorInfo=gohugoio
ERROR 2023/01/14 15:52:14 js.Build failed: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.0.0-20230105191255-374b4019d89d/assets/scripts/application.js:2:7": Could not resolve "bootstrap"
ERROR 2023/01/14 15:52:14 js.Build failed: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.0.0-20230105191255-374b4019d89d/assets/scripts/application.js:3:7": Could not resolve "@fortawesome/fontawesome-free/js/all"
ERROR 2023/01/14 15:52:14 js.Build failed: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.0.0-20230105191255-374b4019d89d/assets/scripts/features/darkmode/darkreader.js:1:54": Could not resolve "darkreader"
ERROR 2023/01/14 15:52:14 js.Build failed: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.0.0-20230105191255-374b4019d89d/assets/scripts/features/syntaxhighlight/hljs.js:1:17": Could not resolve "highlight.js"
ERROR 2023/01/14 15:52:14 js.Build failed: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.0.0-20230105191255-374b4019d89d/assets/scripts/features/videoplayer/plyr.js:1:17": Could not resolve "plyr"
ERROR 2023/01/14 15:52:14 js.Build failed: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.0.0-20230105191255-374b4019d89d/assets/scripts/pages/home.js:1:21": Could not resolve "ityped"
ERROR 2023/01/14 15:52:14 js.Build failed: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.0.0-20230105191255-374b4019d89d/assets/scripts/pages/note.js:1:25": Could not resolve "imagesloaded"
ERROR 2023/01/14 15:52:14 js.Build failed: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.0.0-20230105191255-374b4019d89d/assets/scripts/pages/search.js:1:17": Could not resolve "fuse.js"
ERROR 2023/01/14 15:52:14 js.Build failed: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.0.0-20230105191255-374b4019d89d/assets/scripts/pages/search.js:2:17": Could not resolve "mark.js"
ERROR 2023/01/14 15:52:14 js.Build failed: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.0.0-20230105191255-374b4019d89d/assets/scripts/sections/projects.js:1:22": Could not resolve "filterizr"
ERROR 2023/01/14 15:52:14 js.Build failed: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.0.0-20230105191255-374b4019d89d/assets/scripts/sections/publications.js:1:22": Could not resolve "filterizr"
Error: Error building site: JSBUILD: failed to transform "scripts/application.js" (text/javascript): "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugo-toha/toha/v4@v4.0.0-20230105191255-374b4019d89d/assets/scripts/application.js:1:7": Could not resolve "popper.js"
Total in 5712 ms
Error: Process completed with exit code 255.
To build your site you need to install the Node.js dependencies. When you’re building locally, at some point you did something like npm ci or npm install. Your GitHub workflow does not include that step.
Insert this into your workflow file before you build with Hugo:
Thank you very much.
Yes on my local machine, I have used npm for downloading Bootstrap. I have added npm and Dart Sass transpiler I think.
Now a new error appeared
Run peaceiris/actions-gh-pages@v3.8.0
[INFO] Usage https://github.com/peaceiris/actions-gh-pages#readme
Dump inputs
Setup auth token
Prepare publishing assets
Setup Git config
Create a commit
Push the commit or tag
/usr/bin/git push origin gh-pages
remote: Permission to Giu-seppe/Giu-seppe.github.io.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/Giu-seppe/Giu-seppe.github.io.git/': The requested URL returned error: 403
Error: Action failed with "The process '/usr/bin/git' failed with exit code 128"
What happens if you replace the current workflow with the example that I provided? Obviously, save the old one under a different directory so you can revert the change if you need to.