-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (29 loc) · 860 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
PWD=$(shell pwd)
NAME=jason-blog
DOMAIN=jjasonclark.com
OUT_PATH=$(abspath $(PWD)/public)
CACHE=public, max-age=3600
.PHONY: hugo
hugo:
docker run --rm -v $(PWD):/src $(DOMAIN):latest
.PHONY: hugonative
hugonative:
hugo --cleanDestinationDir -d $(OUT_PATH)
.PHONY: docker
docker:
docker build . -t $(DOMAIN):latest
.PHONY: drafts
drafts:
docker run --rm -v $(PWD):/src $(DOMAIN):latest /bin/hugo --cleanDestinationDir -d $(OUT_PATH) -D
.PHONY: awsdeploy
awsdeploy:
aws s3 sync $(OUT_PATH)/ s3://$(DOMAIN) --delete --cache-control "$(CACHE)"
.PHONY: awsinit
awsinit:
aws cloudformation create-stack --stack-name $(NAME)-terraform --template-body file://terraform/backend.yml --parameters ParameterKey=AppPrefix,ParameterValue=$(NAME)
.PHONY: tfinit
tfinit:
cd terraform && terraform init
.PHONY: tfapply
tfapply:
cd terraform && terraform apply