Hi,
We are currently building our docs and now are working on creating a jenkins pipeline for deployment.
The site that was deployed through jenkins is broken but is working locally. We noticed some files were missing or not generated.
In jenkins build stage we do,
ip-172-31-40-217:~/docs/docs-poc/docs-poc$ hugo -D --baseURL http://docs.example.com/ta/v3.0.0
Start building sites …
hugo v0.140.2-aae02ca612a02e085c08366a9c9279f4abb39d94+extended linux/amd64 BuildDate=2024-12-30T15:01:53Z VendorInfo=gohugoio
WARN "/home/hugo/docs/docs-poc/docs-poc/content/en/ta/_index.html:1:1": duplicate menu entry with identifier "Docs" in menu "main"
| EN | FA | NO
-------------------+----+----+-----
Pages | 97 | 8 | 8
Paginator pages | 0 | 0 | 0
Non-page files | 1 | 1 | 1
Static files | 53 | 53 | 53
Processed images | 2 | 0 | 0
Aliases | 1 | 0 | 0
Cleaned | 0 | 0 | 0
Total in 4433 ms
ip-172-31-40-217:~/docs/docs-poc/docs-poc$ ls -l public/scss/
total 1836
-rw-rw-r-- 1 hugo hugo 1476896 Mar 10 12:04 main.css.map
-rw-rw-r-- 1 hugo hugo 400232 Mar 10 12:16 main.min.f6466d5ff970591c368c6352dfd1f3917c822ffe560ff84f087907ea726ba489.css
In local development we do,
hugo server -D --baseURL=http://localhost:1313/v3 --appendPort=false
This works as expected.
So i tried to publish the public
directory generated by this command
ip-172-31-40-217:~/docs/docs-poc/docs-poc$ hugo server -D --baseURL=http://localhost:1313/v3 --appendPort=false
Watching for changes in /home/hugo/docs/docs-poc/docs-poc/{archetypes,assets,content,data,layouts,package.json,static}
Watching for config changes in /home/hugo/docs/docs-poc/docs-poc/hugo.toml, /home/hugo/docs/docs-poc/docs-poc/go.mod
Start building sites …
hugo v0.140.2-aae02ca612a02e085c08366a9c9279f4abb39d94+extended linux/amd64 BuildDate=2024-12-30T15:01:53Z VendorInfo=gohugoio
WARN "/home/hugo/docs/docs-poc/docs-poc/content/en/ta/_index.html:1:1": duplicate menu entry with identifier "Docs" in menu "main"
| EN | FA | NO
-------------------+----+----+-----
Pages | 97 | 8 | 8
Paginator pages | 0 | 0 | 0
Non-page files | 1 | 1 | 1
Static files | 53 | 53 | 53
Processed images | 2 | 0 | 0
Aliases | 1 | 0 | 0
Cleaned | 0 | 0 | 0
Built in 2814 ms
Environment: "development"
Serving pages from disk
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/v3/ (bind address 127.0.0.1)
Press Ctrl+C to stop
ip-172-31-40-217:~/docs/docs-poc/docs-pocls -l public/scss/
total 1916
-rw-rw-r-- 1 hugo hugo 485620 Mar 10 12:25 main.css
-rw-rw-r-- 1 hugo hugo 1471450 Mar 10 12:25 main.css.map
Are we doing some thing wrong? What should be the correct command for building hugo as part of jenkins?
EDIT:
Version: hugo v0.140.2-aae02ca612a02e085c08366a9c9279f4abb39d94+extended linux/amd64 BuildDate=2024-12-30T15:01:53Z VendorInfo=gohugoio
Theme: Docsy
Missing file main.css
under public/scss when doing just hugo build vs hugo server
Thank you