Skip to content

Instantly share code, notes, and snippets.

@jamesmk
Created November 12, 2014 17:02
Show Gist options
  • Save jamesmk/ebac91f8c58981d30f72 to your computer and use it in GitHub Desktop.
Save jamesmk/ebac91f8c58981d30f72 to your computer and use it in GitHub Desktop.
Codeship Wordpress deployment
TARGET=/path/to/theme
USER=deployuser
SERVER=ip.or.domain
PORT=port
cd ~/clone/
find . -type f -iname \*.coffee -delete
find . -type f -iname \*.scss -delete
find . -type f -iname \*.less -delete
find . -type f -iname \*.scssc -delete
find . -name .sass-cache -type d -exec rm -r {} +
rsync -avz -e "ssh -p $PORT" ~/clone/ $USER@$SERVER:TARGET
ssh $USER@$SERVER -p $PORT "cd $TARGET && rm -rf tmp + && rm -rf .git"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment