ci: use ssh with deploy key for host script execution
Some checks failed
Deploy Canina / deploy (push) Failing after 2s
Some checks failed
Deploy Canina / deploy (push) Failing after 2s
This commit is contained in:
parent
b57b001df1
commit
0c812beffd
@ -10,10 +10,20 @@ jobs:
|
||||
deploy:
|
||||
runs-on: canina
|
||||
steps:
|
||||
- name: Deploy via Host Script
|
||||
- name: Setup SSH key
|
||||
shell: sh
|
||||
env:
|
||||
SSH_KEY: ${{ secrets.DEPLOY_KEY }}
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "$SSH_KEY" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
|
||||
- name: Deploy via SSH (with VPN for docker build)
|
||||
shell: sh
|
||||
env:
|
||||
BRANCH: ${{ github.ref_name }}
|
||||
run: |
|
||||
echo "Deploying branch: ${BRANCH}"
|
||||
sh /opt/services/scripts/with-vpn.sh "sh /opt/services/canina/deploy.sh ${BRANCH}"
|
||||
ssh -o StrictHostKeyChecking=no -p 2234 devops@87.248.133.138 \
|
||||
"sudo bash /opt/services/scripts/with-vpn.sh \"bash /opt/services/canina/deploy.sh ${BRANCH}\""
|
||||
Loading…
Reference in New Issue
Block a user