ssh #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"' |