Настройка CICD

This commit is contained in:
Struchkov Mark 2022-12-18 16:54:15 +03:00
parent 3845d3e0db
commit 7df4c093ba

View File

@ -19,22 +19,19 @@ steps:
from_secret: GPG_PASSPHRASE from_secret: GPG_PASSPHRASE
SSH_KEY: SSH_KEY:
from_secret: SSH_KEY from_secret: SSH_KEY
# SSH_CONFIG:
# from_secret: SSH_CONFIG
commands: commands:
- eval $(ssh-agent -s) - eval $(ssh-agent -s)
- mkdir -p ~/.ssh - mkdir -p ~/.ssh
- chmod 700 ~/.ssh - chmod 700 ~/.ssh
# - echo "$SSH_KEY" >> ~/.ssh/id_rsa
# - echo "$SSH_CONFIG" >> ~/.ssh/config
- echo "$SSH_KEY" | ssh-add - - echo "$SSH_KEY" | ssh-add -
- ssh-keyscan -p 222 git.struchkov.dev >> ~/.ssh/known_hosts - ssh-keyscan -p 222 git.struchkov.dev >> ~/.ssh/known_hosts
- echo "test" >> test.txt - git branch -a
- git add --all # - echo "test" >> test.txt
- git commit -m test # - git add --all
- git remote add deploy ssh://git@git.struchkov.dev:222/Godfather-Bots/godfather.git # - git commit -m test
- git remote -v # - git remote add deploy ssh://git@git.struchkov.dev:222/Godfather-Bots/godfather.git
- git push deploy HEAD:master # - git remote -v
# - git push deploy HEAD:master
# - ssh-keyscan -t rsa git.struchkov.dev >> ~/.ssh/known_hosts # - ssh-keyscan -t rsa git.struchkov.dev >> ~/.ssh/known_hosts
# - chmod 644 ~/.ssh/known_hosts # - chmod 644 ~/.ssh/known_hosts