Skip to content

Commit f250826

Browse files
committed
Make staging user-agnostic
1 parent 15d2e2a commit f250826

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
USER=`whoami`
22
GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`
3-
STAGING_URL="https://docs-mongodborg-staging.corp.mongodb.com"
43
STAGING_BUCKET=docs-mongodb-org-staging
54
STAGING_PREFIX=tutorials
5+
STAGING_URL=http://docs-mongodb-org-staging.s3-website-us-east-1.amazonaws.com/${STAGING_PREFIX}/${USER}/${GIT_BRANCH}
66

77
.PHONY: build server help stage
88

99
help: ## Show this help message
1010
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
1111

1212
build: | tools/node_modules ## Build into public/
13-
hugo
13+
hugo -b "${STAGING_URL}"
1414
$(NODE) tools/genindex.js content public/search.json public/tags.json --config config.toml
1515

1616
server: ## Host the documentation on port 1313
@@ -19,7 +19,7 @@ server: ## Host the documentation on port 1313
1919

2020
stage: build # Upload built artifacts to the staging URL
2121
mut-publish public/ ${STAGING_BUCKET} --prefix=${STAGING_PREFIX} --stage ${ARGS}
22-
@echo "Hosted at ${STAGING_URL}/${STAGING_PREFIX}/${USER}/${GIT_BRANCH}/index.html"
22+
@echo "Hosted at ${STAGING_URL}"
2323

2424
tools/node_modules: tools/package.json
2525
cd tools && npm update

config.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
baseurl = "http://docs-mongodb-org-staging.s3-website-us-east-1.amazonaws.com/tutorials/kirby/master"
21
languageCode = "en-us"
32
title = "MongoDB Tutorials"
43
theme = "mongodb-tutorials"

0 commit comments

Comments
 (0)