File tree 3 files changed +35
-8
lines changed
3 files changed +35
-8
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ version: 2
3
3
# List of jobs
4
4
jobs :
5
5
# The build and test job
6
- build_and_test :
6
+ build-test :
7
7
working_directory : ~/angular-universal
8
8
docker :
9
9
- image : circleci/node:8.9.0-browsers
@@ -54,10 +54,32 @@ jobs:
54
54
- run :
55
55
name : Unit Testing
56
56
command : cd project/application && npm run test -- --watch=false
57
+ # The deploy job
58
+ deploy :
59
+ machine :
60
+ enabled : true
61
+ environment :
62
+ FINGERPRINT : 8c:c8:d3:84:56:47:d7:28:13:2a:d8:2b:4e:53:0e:c0
63
+ SSH_USER : la
64
+ SSH_HOST : angular-universal.lazy-ants.com
65
+ steps :
66
+ - add_ssh_keys :
67
+ fingerprints :
68
+ - " $FINGERPRINT" # https://circleci.com/docs/2.0/add-ssh-key
69
+ - run :
70
+ name : Deploy Over SSH
71
+ command : |
72
+ ssh $SSH_USER@$SSH_HOST "cd /var/www/angular-universal && bash deploy-circleci.sh"
57
73
58
74
workflows :
59
75
version : 2
60
- # The build and test
61
- build_and_test :
76
+ # The build, test and deploy
77
+ build-test_deploy :
62
78
jobs :
63
- - build_and_test
79
+ - build-test
80
+ - deploy :
81
+ requires :
82
+ - build-test
83
+ filters :
84
+ branches :
85
+ only : master
Original file line number Diff line number Diff line change
1
+ echo ' Before checkout'
2
+ git status
3
+ git checkout -- .
4
+ echo ' After checkout'
5
+ git pull origin master
6
+ docker-compose up -d --build
7
+ docker exec -i angular-universal_nodejs npm install
8
+ docker exec -i angular-universal_nodejs bash -c ' npm run build:ssr'
9
+ docker exec -i angular-universal_nodejs bash -c ' npm run serve:ssr'
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments