From 0e258f6636facbd2a67b7161ac2c2c89bd307748 Mon Sep 17 00:00:00 2001 From: SyniRon <66834451+SyniRon@users.noreply.github.com> Date: Wed, 27 Nov 2024 23:50:07 -0500 Subject: [PATCH] setup deployment workflow --- .github/workflows/dev_deploy.yml | 27 +++++++++++++++++++++++++++ compose.yml | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 .github/workflows/dev_deploy.yml diff --git a/.github/workflows/dev_deploy.yml b/.github/workflows/dev_deploy.yml new file mode 100644 index 0000000..785df5f --- /dev/null +++ b/.github/workflows/dev_deploy.yml @@ -0,0 +1,27 @@ +name: Development Deploy + +on: + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup SSH + uses: webfactory/ssh-agent@v0.9.0 + with: + ssh-private-key: ${{ secrets.THE_KEY }} + + - name: Deploy to Server + run: | + ssh -o StrictHostKeyChecking=no thehub@traycer.7cav.us << 'EOF' + cd /etc/compose/apps-beta/adr + git pull origin development + cd /etc/compose/apps-beta/ + docker compose down + docker compose up -d + EOF diff --git a/compose.yml b/compose.yml index 2543a4d..cfbf163 100644 --- a/compose.yml +++ b/compose.yml @@ -1,3 +1,5 @@ +name: apps + services: server: container_name: adr-server