forked from hydren-crypto/stampchain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec.yml
28 lines (27 loc) · 826 Bytes
/
buildspec.yml
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
version: 0.2
phases:
install:
runtime-versions:
nodejs: 16
commands:
- npm install -g clean-css-cli
pre_build:
commands:
- echo "Current directory:"
- pwd
- echo "Directory listing:"
- ls -la
- echo "Parent directory listing:"
- ls -la ..
build:
commands:
- echo "Building the website..."
- echo Minifying CSS...
- cleancss -o style.min.css style.css
post_build:
commands:
- echo "Syncing files to S3..."
- aws s3 sync . s3://stampchain.io --exclude "buildspec.yml" --exclude ".git/*" --exclude README.md --exclude LICENSE
- echo "Invalidating CloudFront distribution..."
- aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/*"
- echo Build completed on `date`