Compare commits

..

2 Commits

Author SHA1 Message Date
0efc6ef560 for push
Some checks failed
Deploy to my-vpn / deploy (push) Has been cancelled
2026-02-06 00:44:11 +03:00
3e57ab3838 for push 2026-02-06 00:42:03 +03:00
4 changed files with 9 additions and 27 deletions

View File

@@ -7,24 +7,18 @@ on:
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: [linux, x64, server-2]
steps: steps:
- name: Deploy via SSH - name: Deploy via SSH
env: env:
VPN_HOST: ${{ secrets.VPN_HOST }} VPN_HOST: ${{ secrets.VPN_HOST }}
VPN_USER: ${{ secrets.VPN_USER }} VPN_USER: ${{ secrets.VPN_USER }}
VPN_SSH_KEY_B64: ${{ secrets.TEST_KEY_B64 }} VPN_SSH_KEY: ${{ secrets.TEST_KEY }}
run: | run: |
set -euo pipefail
mkdir -p ~/.ssh mkdir -p ~/.ssh
chmod 700 ~/.ssh chmod 700 ~/.ssh
printf '%s' "$VPN_SSH_KEY_B64" | base64 -d > ~/.ssh/id_ci_runner echo "$VPN_SSH_KEY" > ~/.ssh/id_ci_runner
chmod 600 ~/.ssh/id_ci_runner chmod 600 ~/.ssh/id_ci_runner
VPN_USER="$(printf '%s' "$VPN_USER" | tr -d '\r\n')" ssh-keyscan -H "$VPN_HOST" >> ~/.ssh/known_hosts
VPN_HOST="$(printf '%s' "$VPN_HOST" | tr -d '\r\n')"
echo "using user=${VPN_USER} host=${VPN_HOST}"
ssh-keyscan -H "$VPN_HOST" >> ~/.ssh/known_hosts || true
ssh-keygen -lf ~/.ssh/id_ci_runner
ssh -vvv -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ~/.ssh/id_ci_runner "${VPN_USER}@${VPN_HOST}" "echo ok"
ssh -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ~/.ssh/id_ci_runner "${VPN_USER}@${VPN_HOST}" "cd /srv/ip-ua && git fetch --all && git reset --hard origin/main && bash deploy/my-vpn/deploy.sh" ssh -i ~/.ssh/id_ci_runner "$VPN_USER@$VPN_HOST" "cd /srv/ip-ua && git fetch --all && git reset --hard origin/main && bash deploy/my-vpn/deploy.sh"

View File

@@ -3,19 +3,3 @@
ok ok
# ci test # ci test
# ci test 2
# ci test 3
# ci test 4
# ci test 5
# ci test 6
# ci test 7
# ci test 8
# ci test 9

3
for_push_alexander Normal file
View File

@@ -0,0 +1,3 @@
for push
for push
for push

1
itsforpush Normal file
View File

@@ -0,0 +1 @@
h