Closed benjaminpope closed 6 months ago
What is going on? Is there a workflow that anyone has that will just work for a GitHub Action?
To run docsy with latest hugo version 0.125.4, some tweaking is needed, see #1973 for details. I authored this PR which hopefully solves your problem. Can you give it a try, please?
Thank you - really appreciate your help!
Merged the PR - the workflow still fails. We get the error message about npx
again:
Run hugo \
hugo: downloading modules …
hugo: collected modules in 24199 ms
Start building sites …
hugo v0.125.4-cc3574ef4f41fccbe88d9443ed066eb10867ada2+extended linux/amd64 BuildDate=2024-04-25T[13](https://github.com/aew10/website/actions/runs/8918256442/job/24492572389#step:8:14):27:26Z VendorInfo=gohugoio
Total in 27202 ms
Error: error building site: POSTCSS: failed to transform "/scss/main.css" (text/css). Check your PostCSS installation; install with "npm install postcss-cli". See https://gohugo.io/hugo-pipes/postcss/: binary with name "npx" not found
Error: Process completed with exit code 1.
I can't see any Actions run on your fork - did it work for you?
I revisited this issue and I was able to make it work by simply adding actions/setup-node
to the workflow.
See my second, improved pull request and my successful action run in my own repo.
Also, have a look at the deployed site and enjoy!
Thank you - it works perfectly! This is really helpful! Perhaps would be of general interest to GitHub Actions users.
Thank you - it works perfectly! This is really helpful!
Glad I could help out.
Perhaps would be of general interest to GitHub Actions users.
Yes indeed. I addressed this with my PR #1435, which has an approval already. This PR is waiting for merging for more than one year already 😞. Please note that this PR takes a different approach (which is more straightforward IMO).
Environment
hugo version
): hugo v0.125.4+extended darwin/arm64 BuildDate=2024-04-25T13:27:26Z VendorInfo=brewProblem
I am trying to deploy this website, which is a clone of the example site, to GitHub Pages using the officially recommended hugo.yaml workflow. I have added the following lines to the workflow to try and match the instructions:
hugo server
builds locally just fine on my M1 MacBook Pro, but when I push to GitHub I get the following error in the workflow:If I downgrade to
v0.9.1
and try again, I get a different errorWhat is going on? Is there a workflow that anyone has that will just work for a GitHub Action?