From c84392abed4281bfca0ea683aa2ec288aae088d0 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Mon, 2 Jan 2023 19:36:54 +0000 Subject: Added .gitlab-ci.yml file --- .gitlab-ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .gitlab-ci.yml (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..00c42c5 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,17 @@ +image: alpine:latest + +pages: + stage: deploy + before_script: + - 'command -v ssh-agent >/dev/null || ( apk add --update openssh )' + - eval $(ssh-agent -s) + - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + - ssh-keyscan $SSH_HOST >> ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts + script: + - ssh -p $SSH_PORT $SSH_USER@$SSH_HOST "hostname + echo 'Welcome!!!'" + only: + - master \ No newline at end of file -- cgit v1.2.3