Compare commits
13 Commits
0efc6ef560
...
680b0f46e5
| Author | SHA1 | Date | |
|---|---|---|---|
| 680b0f46e5 | |||
| 6bc46e73c5 | |||
| cacbd7620a | |||
| 581c5bdb62 | |||
| a80330622e | |||
| 3e8f611cd3 | |||
| c420534639 | |||
| 68b862fe6f | |||
| 55ad4fa4ed | |||
| e3590b8a93 | |||
| 47fad37675 | |||
| b1db95bd2e | |||
| e46554e5dd |
@@ -7,18 +7,24 @@ on:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: [linux, x64, server-2]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Deploy via SSH
|
||||
env:
|
||||
VPN_HOST: ${{ secrets.VPN_HOST }}
|
||||
VPN_USER: ${{ secrets.VPN_USER }}
|
||||
VPN_SSH_KEY: ${{ secrets.TEST_KEY }}
|
||||
VPN_SSH_KEY_B64: ${{ secrets.TEST_KEY_B64 }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p ~/.ssh
|
||||
chmod 700 ~/.ssh
|
||||
echo "$VPN_SSH_KEY" > ~/.ssh/id_ci_runner
|
||||
printf '%s' "$VPN_SSH_KEY_B64" | base64 -d > ~/.ssh/id_ci_runner
|
||||
chmod 600 ~/.ssh/id_ci_runner
|
||||
ssh-keyscan -H "$VPN_HOST" >> ~/.ssh/known_hosts
|
||||
VPN_USER="$(printf '%s' "$VPN_USER" | tr -d '\r\n')"
|
||||
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 -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 -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"
|
||||
|
||||
16
README.md
16
README.md
@@ -3,3 +3,19 @@
|
||||
ok
|
||||
|
||||
# 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
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
for push
|
||||
for push
|
||||
for push
|
||||
@@ -1 +0,0 @@
|
||||
h
|
||||
Reference in New Issue
Block a user