From bf6298ed3dd9e8f2300d1f9aef5b2b1ee0a93526 Mon Sep 17 00:00:00 2001 From: Michael DeMarco Date: Fri, 5 Jan 2024 23:08:23 -0800 Subject: [PATCH] feat: cd for server --- .github/workflows/{deploy.yml => client.yml} | 0 .github/workflows/server.yml | 23 ++++++++++++++++++++ 2 files changed, 23 insertions(+) rename .github/workflows/{deploy.yml => client.yml} (100%) create mode 100644 .github/workflows/server.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/client.yml similarity index 100% rename from .github/workflows/deploy.yml rename to .github/workflows/client.yml diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml new file mode 100644 index 0000000..902e279 --- /dev/null +++ b/.github/workflows/server.yml @@ -0,0 +1,23 @@ +name: Deploy to Digital Ocean + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v2 + + - name: Set up SSH + uses: webfactory/ssh-agent@v0.5.3 + with: + ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + + - name: Connect and deploy project + run: | + ssh -o "StrictHostKeyChecking=no" ${{ secrets.USER }}@${{ secrets.HOST }} "cd ~/bereal-wrapped && docker-compose up --build -d"