scaffold unprompted site: eleventy, templates, gitea CI
Some checks failed
Deploy to S3 / deploy (push) Failing after 1m26s
Some checks failed
Deploy to S3 / deploy (push) Failing after 1m26s
This commit is contained in:
27
Makefile
Normal file
27
Makefile
Normal file
@@ -0,0 +1,27 @@
|
||||
S3_BUCKET ?= s3://donny.nyc
|
||||
CF_DISTRIBUTION_ID ?=
|
||||
|
||||
.PHONY: build dev deploy invalidate
|
||||
|
||||
build:
|
||||
docker build -t unprompted .
|
||||
|
||||
dev:
|
||||
docker run --rm -v $$(pwd):/app -w /app -p 8080:8080 node:22-alpine sh -c "yarn install && yarn dev --port 8080"
|
||||
|
||||
deploy: build
|
||||
docker run --rm \
|
||||
-e AWS_ACCESS_KEY_ID \
|
||||
-e AWS_SECRET_ACCESS_KEY \
|
||||
-e AWS_DEFAULT_REGION \
|
||||
unprompted \
|
||||
aws s3 sync /site $(S3_BUCKET) --delete
|
||||
|
||||
invalidate:
|
||||
ifdef CF_DISTRIBUTION_ID
|
||||
aws cloudfront create-invalidation \
|
||||
--distribution-id $(CF_DISTRIBUTION_ID) \
|
||||
--paths "/*"
|
||||
else
|
||||
@echo "CF_DISTRIBUTION_ID not set, skipping invalidation"
|
||||
endif
|
||||
Reference in New Issue
Block a user