Skip to content

Instantly share code, notes, and snippets.

View azamanaza's full-sized avatar

Miguel Felipe Calo azamanaza

  • nuskin
  • Philippines
View GitHub Profile
@danieltorscho
danieltorscho / on-merge-deploy-to-do.md
Last active April 16, 2024 14:59
GitHub Action deploy nodejs to DigitalOcean Droplet

Github deployment

Requirements:

  • DigitalOcean Droplet (Ubuntu 20.04+) should be created
  • Github repository

Prepare DO Droplet Server:

  • ssh root@DROPLET_IP
  • sudo vi /etc/ssh/sshd_config
  • change PasswordAuthentication from no to yes
@BenSampo
BenSampo / deploy.sh
Last active April 30, 2024 03:41
Laravel deploy script
# 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
@jseed
jseed / gist:5d022570ea52ee09a8f43913214496f1
Last active February 7, 2024 10:01
PowerShell command to delete all branches except master
git checkout master; git branch -D @(git branch | select-string -NotMatch "master" | Foreach {$_.Line.Trim()})