Skip to content

Instantly share code, notes, and snippets.

View portedison's full-sized avatar

Piet van Leeuwen portedison

  • Ōtautahi, Aotearoa
View GitHub Profile
@portedison
portedison / on-merge-deploy-to-do.md
Created July 3, 2023 21:34 — forked from danieltorscho/on-merge-deploy-to-do.md
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
# !/bin/bash
PROJECT_NAME="$1"
TEMPLATE_DIR="$2"
ADDITIONAL_FILES="$3"
if [ "$PROJECT_NAME" = "" ]; then
echo "You must supply a project name."
exit 1
fi