Tailwind isn’t being found in my github action

I’m having a similar problem. I can’t tell why tailwind isn’t being found in my github action.

I think I have the deps necessary in package.json

{
  "name": "tailroad",
  "description": "hugo tailwindcss boilerplate",
  "version": "0.0.1",
  "scripts": {
    "dev": "hugo server --source exampleSite --themesDir ../.. -D --cleanDestinationDir --disableFastRender",
    "build": "hugo --source exampleSite --themesDir ../.. --environment production --forceSyncStatic --gc --minify --templateMetrics --templateMetricsHints",
    "preview": "hugo server --source exampleSite --themesDir ../.. --disableFastRender --navigateToChanged --templateMetrics --templateMetricsHints --watch --forceSyncStatic -e production --minify"
  },
  "devDependencies": {
    "@tailwindcss/cli": "^4.1.7",
    "@tailwindcss/typography": "^0.5.16",
    "tailwindcss": "^4.1.7"
  }
}

I’m not sure why you want an extra step. I suggest using our documented workflow:

https://gohugo.io/host-and-deploy/host-on-github-pages/#procedure

Sorry, should have clarified. I initially followed the posted steps exactly, with the same result. Some Googling led me to try adding that additional step, but it didn’t help.

You might have a look at this simple site hosted on GitHub Pages:
https://github.com/jmooring/hosting-github-pages

Please post a link to your project repository if you need additional assistance.

Yeah, I sure can’t find the problem, just a tiny version difference between yours and mine.

❯ diff .github/workflows/hugo.yaml ~/Downloads/hugo.yaml
35c35
<       HUGO_VERSION: 0.147.2
---
>       HUGO_VERSION: 0.147.0
~/code/blog main !1 ?10 ❯   

This same thing happened on my local machine, but was fixed when I followed this part of the instructions

npm install --save-dev tailwindcss @tailwindcss/cli
npm install --save-dev @tailwindcss/typography

I’m pretty green at this, but it looks like that makes it into package.json ok, but then something is not right in the github pipeline.

{
  "devDependencies": {
    "@tailwindcss/cli": "^4.1.10",
    "@tailwindcss/typography": "^0.5.16",
    "tailwindcss": "^4.1.10"
  }
}

I forked and built your site with the default Hugo workflow and it built fine. Refer to Tailwind isn’t being found in my github action - #4 by jmooring

compare the npm installation on your workflow with the one from the hugo default.

looks like yours does not install the typography extension