Skip to content

Instantly share code, notes, and snippets.

@lucien144
Last active March 14, 2022 20:30
Show Gist options
  • Save lucien144/8f2005adb5ea7bef13c12d1edf1cc7b3 to your computer and use it in GitHub Desktop.
Save lucien144/8f2005adb5ea7bef13c12d1edf1cc7b3 to your computer and use it in GitHub Desktop.
Bitbucket Pipeline to Ubuntu server via bash script
image: atlassian/default-image:2
pipelines:
branches:
master:
- step:
deployment: production
script:
- cat ./deploy.sh | ssh $HOST_USER@$HOST_URL
- echo "Deploy step finished"
#!/bin/bash
echo "Deploy script started"
cd ~/web
git checkout master
git pull origin master
composer install
echo "Deploy script finished execution"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment