Closed instantdreams closed 5 years ago
I've tried this with a different repository, and I am getting the same issue:
Error: Error building site: open D:\a\1\s\content: The system cannot find the file specified.
I ran the following command locally:
"hugo.exe" --source D:\Scripts\InstantDreams-biz --destination D:\Temp\public --enableGitInfo --i18n-warnings --verbose
Everything generated nicely, including creating D:\Temp\public which didn't exist before. I suspect this is the context I'm running under.
I thought it might be the host, so I tried the following:
[command]"C:\Users\VSSADM~1\AppData\Local\Temp\hugotask_v0.55.6\hugo.exe" --source D:\a\1\s --destination D:\a\1\a --enableGitInfo --i18n-warnings --verbose
Error: Error building site: open D:\a\1\s\content: The system cannot find the file specified.
[command]"C:\Users\VSSADM~1\AppData\Local\Temp\hugotask_v0.55.6\hugo.exe" --source D:\a\1\s --destination D:\a\1\a --enableGitInfo --i18n-warnings --verbose
Error: Error building site: open D:\a\1\s\content: The system cannot find the file specified.
[command]"C:\Users\VSSADM~1\AppData\Local\Temp\hugotask_v0.55.6\hugo.exe" --source d:\a\1\s --destination d:\a\1\a --enableGitInfo --i18n-warnings --verbose
[error]Error: Error building site: open d:\a\1\s\content: The system cannot find the file specified.
[command]"C:\Users\VSSADM~1\AppData\Local\Temp\hugotask_v0.55.6\hugo.exe" --source D:\a\1\s --destination D:\a\1\a --enableGitInfo --i18n-warnings --verbose
Error: Error building site: open D:\a\1\s\content: The system cannot find the file specified.
It appears to be a similar error regardless of the host.
This issue has been resolved. The solution was including the Base URL.
Final Configuration:
I am not sure why this failed without the Base URL specified. Running the following command locally worked:
"hugo.exe" --source "D:\Scripts\sitename" --destination "D:\ServerFolders\Company\Temp\public" --enableGitInfo --i18n-warnings --verbose
But the same command in the VSTS extension:
"C:\Users\VSSADM~1\AppData\Local\Temp\hugotask_v0.55.6\hugo.exe" --source D:\a\1\a --destination D:\a\1\a\public --enableGitInfo --i18n-warnings --verbose
Gave the errors with the content folder. Ah well, at least this is the fix.
I spoke to soon - in another example, I had to create a dummy.txt file in a content folder to have the extension build successfully. THAT seems to have fixed it.
In my Azure DevOps pipeline, I have a Build pipeline. It contains two processes:
The "Get sources" process retrieves my Hugo repository content and appears to always have a successful checkout to D:/a/1/s/
The Hugo Build process has a Hugo generate and a Publish Artifact: public task.
The Hugo generate task uses the following settings:
When Hugo generate runs, I receive the following error message:
Any help would be most welcome.