[CI] Migrate to npm-managed local Hugo and standardise Makefile targets#117
Conversation
Signed-off-by: Heby T Paul <hebytpaul1111@gmail.com>
Signed-off-by: Heby T Paul <hebytpaul1111@gmail.com>
|
Signed-off-by: Heby T Paul <hebytpaul1111@gmail.com>
Signed-off-by: Heby T Paul <65991026+hebypaul@users.noreply.github.com>
Signed-off-by: Yī nuò <218099172+yi-nuo426@users.noreply.github.com>
|
Resolved merge conflict |
|
@saurabhraghuvanshii wdyt? |
There was a problem hiding this comment.
Pull request overview
This PR updates meshery-academy’s local build workflow to use an npm-managed local hugo-extended binary and standardizes common Makefile targets to route through npm run scripts, reducing reliance on globally installed Hugo.
Changes:
- Added a dependency preflight (
check-deps) and updatedbuild/site/serve/clean/theme-updateMakefile targets to use npm scripts. - Added
dev:*npm scripts to run Hugo commands using the locally installed binary. - Updated contributor docs (
README.md,CONTRIBUTING.md) to reflect the revisedmake setup→make site/make buildworkflow.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| README.md | Updates local preview steps to use make setup and make site. |
| package.json | Adds dev:* scripts and updates Hugo/serve-related script wiring. |
| Makefile | Introduces check-deps and reroutes key targets through npm scripts. |
| CONTRIBUTING.md | Replaces outdated “run-tests” guidance with make build build verification. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| echo "Updating to latest academy-theme..." && \ | ||
| hugo mod get github.com/layer5io/academy-theme | ||
| npm run update:theme |
| ## Local: Build site for local consumption | ||
| build: | ||
| hugo build | ||
| ## Build site for preview (no drafts, no future, no expired content) with dynamically set baseURL. |
| - [Go](https://go.dev/dl/) ≥ 1.26 | ||
| - [Hugo Extended](https://gohugo.io/getting-started/installing/) ≥ 0.158 (required for `hugo.Sites` in offline search index; CI uses 0.158) |
| "update:dep": "npm install --save-dev autoprefixer@latest postcss-cli@latest", | ||
| "update:hugo": "npm install --save-dev --save-exact hugo-extended@latest", | ||
| "update:pkgs": "npx npm-check-updates -u" | ||
| "update:pkgs": "npx npm-check-updates -u", |
|
@suttonskate, I think we need this change because many systems don't have Hugo installed globally, which can make the setup process difficult. Having a single source of truth is a better approach and should help simplify the setup experience. |
|
@hebypaul merge conflicts please take a look. |
Signed-off-by: Heby T Paul <hebytpaul1111@gmail.com>
Signed-off-by: Heby T Paul <hebytpaul1111@gmail.com>
Notes for Reviewers
This PR migrates the
meshery-academybuild process to use an npm-managed local Hugo dependency, aligning it with the main Meshery repository standards.Specific updates include:
check-depstarget to the Makefile.site,serve,build, andcleancommands tonpm runscripts.dev:*scripts topackage.jsonto handle Hugo commands without requiring a global installation.README.mdandCONTRIBUTING.md.This PR fixes #116
Signed commits