Skip to content

Merge pull request #274 from cmu15122/preview #14

Merge pull request #274 from cmu15122/preview

Merge pull request #274 from cmu15122/preview #14

Workflow file for this run

name: Deploy Queue to Production
on:
push:
branches: [ production ]
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-live/
- name: Deploy to production 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-live
./restart.sh