Requirements:
- DigitalOcean Droplet (Ubuntu 20.04+) should be created
- Github repository
ssh root@DROPLET_IP
sudo vi /etc/ssh/sshd_config
- change
PasswordAuthentication
fromno
toyes
# Change to the project directory | |
cd $FORGE_SITE_PATH | |
# Turn on maintenance mode | |
php artisan down || true | |
# Pull the latest changes from the git repository | |
# git reset --hard | |
# git clean -df | |
git pull origin $FORGE_SITE_BRANCH |
git checkout master; git branch -D @(git branch | select-string -NotMatch "master" | Foreach {$_.Line.Trim()}) |