Skip to content

Commit

Permalink
🚧 Hide command output
Browse files Browse the repository at this point in the history
  • Loading branch information
WincerChan committed Jun 8, 2018
1 parent 5b48431 commit 55a78ae
Showing 1 changed file with 17 additions and 33 deletions.
50 changes: 17 additions & 33 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,27 @@
defaults:
working_directory: /tmp

version: 2
jobs:
build:
<<:
docker:
- image: circleci/node:10.4.0
steps:
- run: pwd
- run:
name: Update System
command: |
sudo apt-get update && sudo apt-get install rsync
- checkout
- run: yarn install
- run: yarn build
- run: pwd
- run: mkdir -p meme
- persist_to_workspace:
root: meme
paths:
- echo-output
deploy:
<<:
machine:
enables: true
steps:
- attach_workspace:
at: /tmp/meme
- run:
name: Install Dependence
command: |
yarn install && yarn build
- run:
name: Deploy Over SSH
name: Add KnownHosts
command: |
rsync -az -vv --delete -e ssh build/* $SSH_USER@$SSH_IP:/data/www/meme/
workflows:
version: 2
build-and-deploy:
jobs:
- build
{ ssh-keyscan $SSH_IP 2> /del/null } >> ~/.ssh/known_hosts
- deploy:
requires:
- build
filters:
branches:
only: master
name: Deploy via ssh
command: |
if [ ${CIRCLE_BRANCH} = "master" ];then
rsync -az -v --delete -e ssh build/* $SSH_USER@$SSH_IP:/data/www/meme/
else
echo "Not master branch"
fi

0 comments on commit 55a78ae

Please sign in to comment.