Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.22 KB

deployment.md

File metadata and controls

37 lines (25 loc) · 1.22 KB

Deployment

Deploy the ./bin/deploy to your server, then you need to add the deployment key, as following.

You may want to trigger the script manually or by webhook (require additional setup which not cover in this repo).

This script will deploy based on latest tagged. It won't deploy to any non-tagged. Run the follow command as root user.

Creating Deployment Key

TLDR, create deployment keys:

$ ssh-keygen -t ed25519 -C "your@email.com"
> Enter a file in which to save the key (/Users/you/.ssh/id_algorithm):
> Enter passphrase (empty for no passphrase): [Type a passphrase]
> Enter same passphrase again: [Type passphrase again]
$ eval "$(ssh-agent -s)"
$ ssh-add -k /Users/you/.ssh/id_algorithm
$ cat /Users/you/.ssh/id_algorithm.pub

Copy the output then add key in Deploy Keys

References:

  1. https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
  2. https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account

Running the Script

Deploy it anywhere in your server, then run:

sudo su
. ./deploy