Skip to content

Commit 4b6f825

Browse files
committed
Updated circle pipeline
1 parent f2cc67a commit 4b6f825

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

.circleci/config.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: 2.1
2+
3+
orbs:
4+
node: circleci/[email protected]
5+
6+
jobs:
7+
build-and-publish:
8+
docker:
9+
- image: cimg/node:14
10+
steps:
11+
- checkout
12+
- node/install-packages
13+
- run:
14+
name: Build
15+
command: npm run prod:build
16+
- run:
17+
name: Copy assets
18+
command: cp -R dist/* $CIRCLE_ARTIFACTS
19+
- run:
20+
name: Deploy
21+
command: >
22+
if [ $CIRCLE_BRANCH = 'master' ]; then aws s3 sync dist s3://fullstackbulletin.com && aws configure set preview.cloudfront true && aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --invalidation-batch "{ \"Paths\": { \"Quantity\": 1, \"Items\": [ \"/*\" ] }, \"CallerReference\": \"CIRCLE-CI-BUILD-$CIRCLE_BUILD_NUM-$CIRCLE_SHA1\" }"; fi
23+
24+
workflows:
25+
build:
26+
jobs:
27+
- build-and-publish

circle.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)