I cannot find my code on the server after deployment
I have deployed a project with Gitlab CI, but I cannot find the code in the directory that I specified. the directory is /home/ec2-user/tutorial as specified in the deployment script. Can someone please help me? Thank you in advance. Below is script.
.gitlab-deploy.sh
echo "Deploying to production" #echo $CI_JOB_STAGE echo "Deploy project on server $K8S_SECRET_DEPLOY_SEVER" ssh ec2-user@$K8S_SECRET_DEPLOY_SEVER "sudo cd /home/ec2-user/tutorial git init" ssh ec2-user@$K8S_SECRET_DEPLOY_SEVER "sudo cd /home/ec2-user/tutorial && git clone https://gitlab.com/makut/simple-python-pyinstaller-app.git " #done
Job logs
Running with gitlab-runner 12.3.0 (a8a019e0) on docker-auto-scale fa6cab46 Using Docker executor with image ruby:2.5 ... Pulling docker image ruby:2.5 ... Using docker image sha256:e216e233b2581d7f45d2bc2c4dce4f1f293267b29c45bfd929d038a9a67b4058 for ruby:2.5 ... Running on runner-fa6cab46-project-14894821-concurrent-0 via runner-fa6cab46-srm-1571830578-9d61e0bb... Fetching changes with git depth set to 50... Initialized empty Git repository in /builds/makut/simple-python-pyinstaller-app/.git/ Created fresh repository. From https://gitlab.com/makut/simple-python-pyinstaller-app
- [new ref] refs/pipelines/90862421 -> refs/pipelines/90862421
- [new branch] master -> origin/master Checking out 1cc03a03 as master...
Skipping Git submodules setup $ mkdir -p ~/.ssh $ echo -e "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa $ chmod 600 ~/.ssh/id_rsa $ -f /.dockerenv && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config $ sh .gitlab-deploy.sh Deploying to production Deploy project on server x.x.x.170 Warning: Permanently added 'x.x.x.170' (ECDSA) to the list of known hosts. Cloning into 'simple-python-pyinstaller-app'... Job succeeded