Skip to content

Commit

Permalink
Run commands over ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
urielsalis authored Sep 4, 2024
1 parent fa55771 commit 0bfc787
Showing 1 changed file with 6 additions and 72 deletions.
78 changes: 6 additions & 72 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,75 +68,9 @@ jobs:
rsync $ARGS -e 'ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no -p 50022' $GITHUB_WORKSPACE/$FOLDER [email protected]:$SERVER_DESTINATION
echo Run internal deploy script
/usr/bin/screen -ls | /bin/egrep 'Detached|Attached' | /usr/bin/cut -d. -f1 | /usr/bin/awk '{print $1}' | /usr/bin/xargs /bin/kill
sleep 1
cd r-isa
/usr/bin/screen -d -m bash -c '/home/risa/r-isa/bin/risa; exec sh'
# - name: Upload new libraries
# uses: urielsalis/rsync-deploy@master
# env:
# DEPLOY_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
# SERVER_PORT: 50022
# FOLDER: "build/install/risa/lib"
# ARGS: "-avh --delete"
# SERVER_IP: localhost
# USERNAME: risa
# SERVER_DESTINATION: /home/risa/r-isa
# CLIENT_ID: ${{ secrets.CLIENT_ID }}
# CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
# RESOURCE_ID: ${{ secrets.RESOURCE_ID }}
# RESOURCE_GROUP: ${{ secrets.RESOURCE_GROUP }}
# TENANT_ID: ${{ secrets.TENANT_ID }}
# BASTION_NAME: ${{ secrets.BASTION_NAME }}
# - name: Upload new binaries
# uses: urielsalis/rsync-deploy@master
# env:
# DEPLOY_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
# SERVER_PORT: 50022
# FOLDER: "build/install/risa/bin"
# ARGS: "-avh --delete"
# SERVER_IP: localhost
# USERNAME: risa
# SERVER_DESTINATION: /home/risa/r-isa
# CLIENT_ID: ${{ secrets.CLIENT_ID }}
# CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
# RESOURCE_ID: ${{ secrets.RESOURCE_ID }}
# RESOURCE_GROUP: ${{ secrets.RESOURCE_GROUP }}
# TENANT_ID: ${{ secrets.TENANT_ID }}
# BASTION_NAME: ${{ secrets.BASTION_NAME }}
# - name: Upload new configuration
# uses: urielsalis/rsync-deploy@master
# env:
# DEPLOY_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
# SERVER_PORT: 50022
# FOLDER: "risa.yml"
# ARGS: "-avh --delete"
# SERVER_IP: localhost
# USERNAME: risa
# SERVER_DESTINATION: /home/risa/r-isa
# CLIENT_ID: ${{ secrets.CLIENT_ID }}
# CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
# RESOURCE_ID: ${{ secrets.RESOURCE_ID }}
# RESOURCE_GROUP: ${{ secrets.RESOURCE_GROUP }}
# TENANT_ID: ${{ secrets.TENANT_ID }}
# BASTION_NAME: ${{ secrets.BASTION_NAME }}
# - name: Run internal deploy script
# uses: urielsalis/azure-bastion-ssh-action@master
# env:
# CLIENT_ID: ${{ secrets.CLIENT_ID }}
# CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
# RESOURCE_ID: ${{ secrets.RESOURCE_ID }}
# RESOURCE_GROUP: ${{ secrets.RESOURCE_GROUP }}
# TENANT_ID: ${{ secrets.TENANT_ID }}
# BASTION_NAME: ${{ secrets.BASTION_NAME }}
# with:
# host: localhost
# port: 50022
# user: risa
# key: ${{ secrets.SSH_PRIVATE_KEY }}
# command: |
# /usr/bin/screen -ls | /bin/egrep 'Detached|Attached' | /usr/bin/cut -d. -f1 | /usr/bin/awk '{print $1}' | /usr/bin/xargs /bin/kill
# sleep 1
# cd r-isa
# /usr/bin/screen -d -m bash -c '/home/risa/r-isa/bin/risa; exec sh'
# args: "-tt"
ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no -p 50022 [email protected]:$SERVER_DESTINATION << EOF
/usr/bin/screen -ls | /bin/egrep 'Detached|Attached' | /usr/bin/cut -d. -f1 | /usr/bin/awk '{print $1}' | /usr/bin/xargs /bin/kill
sleep 1
cd r-isa
/usr/bin/screen -d -m bash -c '/home/risa/r-isa/bin/risa; exec sh'
EOF

0 comments on commit 0bfc787

Please sign in to comment.