diff options
author | Shohei Ueda <30958501+peaceiris@users.noreply.github.com> | 2021-05-29 01:45:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-29 01:45:11 +0300 |
commit | be4263a89e5395ac47da16e997f311bd19e627e7 (patch) | |
tree | 0e31e8f5104f09f7b08dde1daf13e484c494226f /Makefile | |
parent | 5ef218071e1d974d51902b486683cb611f02494d (diff) |
ci: Set HUGO_MODULE_REPLACEMENTS (#358)
- replacements https://gohugo.io/hugo-modules/configuration/
- https://gohugo.io/news/0.77.0-relnotes/
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 30 |
1 files changed, 19 insertions, 11 deletions
@@ -1,21 +1,21 @@ +include .env + pwd := $(CURDIR) cmd := "" DOCKER_COMPOSE := docker-compose -OPEN_BROWSER := open http://localhost:1313 -BASE_URL := https://hugothemeiris.peaceiris.app/ +GH_USER_ID := $(GH_USER_ID) .PHONY: up up: - # $(OPEN_BROWSER) $(DOCKER_COMPOSE) up -d $(DOCKER_COMPOSE) exec hugo hugo \ - server --navigateToChanged --bind=0.0.0.0 --buildDrafts --themesDir ../../ --i18n-warnings + server --navigateToChanged --bind=0.0.0.0 --buildDrafts --i18n-warnings .PHONY: npm-up npm-up: cd ./exampleSite && \ - hugo server --navigateToChanged --buildDrafts --themesDir ../../ --i18n-warnings + hugo server --navigateToChanged --buildDrafts --i18n-warnings .PHONY: hugo hugo: @@ -28,29 +28,29 @@ bumphugo: .PHONY: build build: - $(eval opt := --minify --themesDir ../../ --baseURL $(BASE_URL) --cleanDestinationDir) + $(eval opt := --minify --baseURL $(BASE_URL) --cleanDestinationDir) $(DOCKER_COMPOSE) run --rm --entrypoint=hugo hugo $(opt) .PHONY: npm-build npm-build: cd ./exampleSite && \ - hugo --minify --themesDir ../../ --baseURL $(BASE_URL) --cleanDestinationDir + hugo --minify --baseURL $(BASE_URL) --cleanDestinationDir .PHONY: test test: - $(eval opt := --minify --themesDir ../../ --baseURL $(BASE_URL) \ + $(eval opt := --minify --baseURL $(BASE_URL) \ --renderToMemory --i18n-warnings --path-warnings --debug) $(DOCKER_COMPOSE) run --rm --entrypoint=hugo hugo $(opt) .PHONY: npm-test npm-test: cd ./exampleSite && \ - hugo --minify --themesDir ../../ --baseURL $(BASE_URL) \ + hugo --minify --baseURL $(BASE_URL) \ --renderToMemory --i18n-warnings --path-warnings --debug .PHONY: metrics metrics: - $(eval opt := --minify --themesDir ../../ --baseURL $(BASE_URL) \ + $(eval opt := --minify --baseURL $(BASE_URL) \ --renderToMemory --i18n-warnings --path-warnings --debug \ --templateMetrics --templateMetricsHints) $(DOCKER_COMPOSE) run --rm --entrypoint=hugo hugo $(opt) @@ -59,8 +59,16 @@ metrics: cibuild: cd ./exampleSite && \ hugo --minify \ - --themesDir ../../ \ --baseURL '/' \ --cleanDestinationDir \ --i18n-warnings --path-warnings --debug \ --templateMetrics --templateMetricsHints + +.PHONY: cibuild-prod +cibuild-prod: + cd ./exampleSite && \ + bash ./scripts/fetch_data.sh ${GH_USER_ID} > ./data/github/${GH_USER_ID}.json && \ + hugo --minify --cleanDestinationDir \ + --baseURL ${BASE_URL} \ + --i18n-warnings --path-warnings && \ + wget -O ./public/report.html ${BASE_URL}/report.html || true |