First, generate a new, passwordless SSH key pair. Add the public SSH key to your server, by copying its content to your server's user ~/.authorized_keys file.
The content of a public SSH key is typically located in ~/.ssh/id_rsa.pub or ~/.ssh/id_dsa.pub on your development machine.
The private SSH key will be added to Semaphore later.
To get started, find your desired project and follow "Set Up Deployment" link under list of the branches.
When asked about the deployment method, choose the "Generic" option.
After that, select either Automatic or Manual deployment strategy. See understanding automatic and manual deployment on Semaphore if you are not sure which option would work best for you.
We recommend that you read about the sequence of steps Semaphore executes before your deploy commands.
In order for our git-deploy deployment to work, we need to do the following.
This translates into the following deploy commands (adapt to your values):
ssh-keyscan -H -p 22 yourserver.com >> ~/.ssh/known_hosts git remote add production "email@example.com:/apps/myapp/current" || true git push --force production $BRANCH_NAME:master
Some users have reported that running git remote rm production || true before git remote add ... helps solve problems that might occur if you change the value of remote, since Semaphore is caching your git repository between builds and deploys.
On the next screen, simply paste the private SSH key that you generated earlier in Step 1.
In this step you need to provide a name for your server, which can be any name you like. It will be used on your Semaphore dashboard and deployment timeline. During this step, you may also choose to set a server URL for quick access to wherever you are deploying your application.
The final screen will show you an overview of what you've configured.
You are now ready to finish up the process and start deploying.
Semaphore Docs are open source — Edit on GitHub