@@ -18,40 +18,47 @@ include .github/build/Makefile-show-help.mk
1818# ----------------------------------------------------------------------------
1919# Academy
2020# ---------------------------------------------------------------------------
21- .PHONY : setup academy-dev staging -build prod-build update-module
21+ .PHONY : setup build stg -build prod-build theme- update sync-with-cloud site
2222
23- # # Install site dependencies
23+ # # ------------------------------------------------------------
24+ ----LOCAL_BUILDS : Show help for available targets
25+
26+ # # Local: Install site dependencies
2427setup :
2528 npm i
2629
30+ # # Local: Build site for local consumption
31+ build :
32+ hugo build
33+
34+ # # Local: Build and run site locally
35+ site :
36+ hugo serve
37+
38+ # # ------------------------------------------------------------
39+ ----REMOTE_BUILDS : Show help for available targets
40+
41+ # # Build site using Layer5 Cloud Staging as the baseURL
42+ stg-build :
43+ hugo --cleanDestinationDir --gc --minify --baseURL " https://staging-cloud.layer5.io/academy"
44+
2745# # Build site using Layer5 Cloud as the baseURL
2846prod-build :
2947 hugo --cleanDestinationDir --gc --minify --baseURL " https://cloud.layer5.io/academy"
3048
31- # # Build site using Layer5 Cloud Staging as the baseURL
32- staging-build :
33- hugo --cleanDestinationDir --gc --minify --baseURL " https://staging-cloud.layer5.io/academy"
3449
35- # # Build site for local consumption
36- academy-dev :
37- hugo build
50+ # # ------------------------------------------------------------
51+ ----MAINTENANCE : Show help for available targets
3852
39- # # Build and run site locally
40- site :
41- hugo serve
53+ # # Update the academy-theme package to latest version
54+ theme-update :
55+ echo " Updating to latest academy-theme..." && \
56+ hugo mod get -u
4257
43- # # Upgrade site's theme to latest version
44- # # Change to "theme-upgrade"
45- update-module :
46- @if [ -z " $( module) " ] || [ -z " $( version) " ]; then \
47- echo " Usage: make update-module module=<module-path> version=<version>" ; \
48- exit 1; \
49- fi && \
50- echo " Updating Hugo module: $( module) to version $( version) " && \
51- hugo mod get $(module ) @$(version )
52-
53- # # Publish Academy build to Layer5 Cloud
58+ # # Publish Academy build to Layer5 Cloud.
59+ # # Copy built site from public/ to
60+ # # ../meshery-cloud/academy directory
5461sync-with-cloud :
5562 rm -rf ../meshery-cloud/academy
5663 mkdir -p ../meshery-cloud/academy
57- rsync -av --delete public/ ../meshery-cloud/academy/
64+ rsync -av --delete public/ ../meshery-cloud/academy/
0 commit comments