corso/website/Makefile
Niraj Tolia 00103d9531
Add CF distribution id for Corso website (#1316)
## Description

This allows us to automate website publishing

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [x] 💻 CI/Deployment
2022-10-25 01:15:03 +00:00

26 lines
632 B
Makefile

.PHONY: buildimage dev shell build publish sync
WEBC := docker run --rm -it --init -p 5050:3000 -p 5051:3001 \
-v ${PWD}:/usr/src/website corso/website:latest
buildimage:
docker build -t "corso/website:latest" .
dev:
$(WEBC) gulp
shell:
$(WEBC) /bin/bash
build:
$(WEBC) gulp build
publish: build
docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY \
-e AWS_SESSION_TOKEN --rm -v ${PWD}:/usr/src/website corso/website:latest \
make sync
sync:
aws s3 sync /usr/src/website/dist/ s3://corsobackup.io/ --exclude ".git/*" --delete
aws cloudfront create-invalidation --distribution-id E1W9NGI9YTVZ1A --paths "/*"