Skip to content

Merge pull request #259 from cmu15122/jtromero/fixWaitTimes #26

Merge pull request #259 from cmu15122/jtromero/fixWaitTimes

Merge pull request #259 from cmu15122/jtromero/fixWaitTimes #26

Workflow file for this run

name: Deploy Queue to Preview Environment
on:
push:
branches: [ preview ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{secrets.SSH_PRIVATE_KEY}}
known_hosts: 'placeholder'
- name: Adding Known Hosts
run: ssh-keyscan -H ${{ secrets.SSH_HOST_IP }} >> ~/.ssh/known_hosts
- name: Move to machine with rsync
run: rsync -avz /home/runner/work/q-prime/q-prime ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST_IP }}:/home/${{ secrets.SSH_USER }}/q-dev/
- name: Deploy to preview environment and restart
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST_IP }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd /home/${{ secrets.SSH_USER }}/q-dev
./restart_preview.sh