Skip to content

ssh

ssh #16

Workflow file for this run

name: ssh
on: workflow_dispatch
jobs:
test:
name: Test ssh
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: twingate/github-action@v1
with:
service-key: ${{ secrets.TWINGATE_KEY }}
- name: SSH into remote server
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
echo "$SSH_PRIVATE_KEY" > deploy_key
chmod 600 deploy_key
ssh -o StrictHostKeyChecking=no -i deploy_key root@10.225.0.216 'bash -l -c "cd /opt/forge-api/current; RACK_ENV=main bundle exec rake -T"'