Skip to content

simple build pipeline ssh deployment, closes #2 #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

maxistar
Copy link
Contributor

Here is an example of simple CI/CD pipeline to deploy documentation to remote server. I tested it is my apache vebserver and was able to deploy to my custom domain http://operaton.x.maxistar.me/ from foked repository.

Here is how to set this up:

Set the following secrets in your GitHub repository (Settings > Secrets and variables > Actions):

SSH_USER — SSH username
SSH_HOST — SSH hostname (e.g. example.com)
SSH_PORT — SSH port (e.g. 22)
SSH_PATH — Path on server where you want to deploy (e.g. /var/www/operaton-documenation/html/)

setup SSH_KEY:

`ssh-keygen -t rsa -b 4096 -C "github-actions-deploy" -f docusaurus_deploy_key``

cat docusaurus_deploy_key.pub

on remote server:

mkdir -p ~/.ssh
nano ~/.ssh/authorized_keys
# Paste the public key here
chmod 600 ~/.ssh/authorized_keys
  • copy private key cat docusaurus_deploy_key
  • in gihub: Settings > Secrets and variables > Actions
  • Add a new secret named: SSH_PRIVATE_KEY

once pipeline is merged to main branch you can trigger it manually.

this PR closes #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set up build pipeline
2 participants