summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Gonzalez <roger@rogs.me>2023-01-02 19:36:54 +0000
committerRoger Gonzalez <roger@rogs.me>2023-01-02 19:36:54 +0000
commitc84392abed4281bfca0ea683aa2ec288aae088d0 (patch)
tree2e5e877f2e467c97bd48dc66f677e7a207a03715
parente173badee7e5e7334f917c1751617c428fb3af1e (diff)
Added .gitlab-ci.yml file
-rw-r--r--.gitlab-ci.yml17
1 files changed, 17 insertions, 0 deletions
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