deploy website using ssh
hey guys , I'm new to space , I have a small website and a small project that I'm trying to develop .
this part of website is a simple template and I just need to sync files between repository and server.
my server is an ubuntu server right now .
I tried to use jobs for this and execute SSH commands and then using git pull on the server , but couldn't find a complete guide for it .
so I'm completely lost on it , is there anything that i can do ? do you think using docker may help ? any suggestions ?
I was considering migrating to GitLab for CI/DI , but i want it to work on space .
I appreciate your help .
Please sign in to leave a comment.
Hello! There's no specific guide for it, however, I'll be glad to assist you with this case. Using Space automation for it seems to be a good solution. In general, the process should be the following:
Could you please try this flow and let me know if any additional questions appear?
Thanks!
I have found this post searching for "jetbrains space ssh deployment". I have solved it this way:
1. Create SSH connection parameters
Go to Settings -> Secrets & Parameters
Create following Parameters (key: value):
Create following Secrets (key: value):
Hint: The editor may give you following message entering your SSH private key:
Please ignore this message and leave the trailing carriage return or the private key cannot be used (you'll get a format error).
2. Add Space Automation
Add the file .space.kts to your repository
3. Prepare SSH target server
Add SSH public key
Add deployment script
Do whatever you like, e.g. /home/user/run.sh
thans Benjamin Krueger. this is vey usefull and exactly what i need to do but i am stuck à this step :
Create following Secrets (key: value):
I can't manage to create my SSH private key on space. How can i do that?
Hello Mouhotpe , if you have created a key pair (using ssh-keygen on Linux or WSL on Windows for example) you'll have two files:
Just let me know if you're still stuck somewhere.