diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..47033a3c6 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,18 @@ +name: Release +on: + workflow_dispatch: +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Run SSH command + env: + SSH_PRIVATE_KEY: ${{ secrets.AWS_PEM }} + HOST: ${{ secrets.AWS_HOST }} + run: | + mkdir -p ~/.ssh + echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh -o StrictHostKeyChecking=no "$HOST" "sh /data/services/restart_bioregistry.sh"