Skip to content

Commit 1cdfda0

Browse files
authored
Merge pull request #167 from rtfpessoa/release-website-automatically
Release website on master deployments
2 parents cbfa0aa + 4a22c4c commit 1cdfda0

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.circleci/config.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ jobs:
3232
- run: yarn run test
3333
- run: yarn run lint
3434
- run: yarn run codacy
35+
- persist_to_workspace:
36+
root: ~/diff2html
37+
paths:
38+
- docs
39+
- dist
3540

3641
build-node_4:
3742
<<: *common-build
@@ -68,6 +73,23 @@ jobs:
6873
docker:
6974
- image: node:10
7075

76+
deploy:
77+
machine:
78+
enabled: true
79+
working_directory: ~/diff2html
80+
steps:
81+
- attach_workspace:
82+
at: .
83+
- run:
84+
name: Prepare website sources
85+
command: |
86+
rm -f docs/assets
87+
mv dist docs/assets
88+
- run:
89+
name: Deploy
90+
working_directory: ~/diff2html/docs
91+
command: aws s3 sync . s3://diff2html.rtfpessoa.xyz --region eu-west-1
92+
7193
workflows:
7294
version: 2
7395
build:
@@ -79,3 +101,9 @@ workflows:
79101
- build-node_8
80102
- build-node_9
81103
- build-node_10
104+
- deploy:
105+
requires:
106+
- build-node_10
107+
filters:
108+
branches:
109+
only: master

0 commit comments

Comments
 (0)