From 5bd06a11d947e40fc8461b7c207bf53a75b7de9d Mon Sep 17 00:00:00 2001 From: SyniRon <66834451+SyniRon@users.noreply.github.com> Date: Wed, 15 Oct 2025 22:58:12 -0400 Subject: [PATCH 1/3] Update dev deploy workflow for new containers --- .github/workflows/dev_deploy.yml | 41 ++++++++++++++++++---------- .github/workflows/old_dev_deploy.yml | 35 ++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/old_dev_deploy.yml diff --git a/.github/workflows/dev_deploy.yml b/.github/workflows/dev_deploy.yml index 97213e5..aaef2d5 100644 --- a/.github/workflows/dev_deploy.yml +++ b/.github/workflows/dev_deploy.yml @@ -1,4 +1,4 @@ -name: Development Deploy +name: Build and Push Docker Image on: workflow_dispatch: @@ -8,8 +8,9 @@ on: required: true type: string default: "development" + jobs: - deploy: + build: runs-on: ubuntu-latest steps: @@ -18,18 +19,30 @@ jobs: with: ref: ${{ github.event.inputs.branch }} - - name: Setup SSH - uses: webfactory/ssh-agent@v0.9.0 + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and Push Client Docker Image + uses: docker/build-push-action@v5 + with: + context: ./client + push: true + tags: | + 7cav/apps_beta_client:${{ github.sha }} + 7cav/apps_beta_client:latest + + - name: Build and Push Server Docker Image + uses: docker/build-push-action@v5 with: - ssh-private-key: ${{ secrets.THE_KEY }} + context: ./server + push: true + tags: | + 7cav/apps_beta_server:${{ github.sha }} + 7cav/apps_beta_server:latest - - name: Deploy to Server + - name: Force Watchtower Update run: | - ssh -o StrictHostKeyChecking=no thehub@traycer.7cav.us << 'EOF' - cd /etc/compose/apps-beta/adr - git fetch origin - git reset --hard origin/${{ github.event.inputs.branch }} - cd /etc/compose/apps-beta/ - docker compose down - docker compose up -d - EOF + curl -H "Authorization: Bearer ${{ secrets.WATCHER_KEY }}" https://watcher.7cav.us/v1/update \ No newline at end of file diff --git a/.github/workflows/old_dev_deploy.yml b/.github/workflows/old_dev_deploy.yml new file mode 100644 index 0000000..97213e5 --- /dev/null +++ b/.github/workflows/old_dev_deploy.yml @@ -0,0 +1,35 @@ +name: Development Deploy + +on: + workflow_dispatch: + inputs: + branch: + description: "Branch to deploy" + required: true + type: string + default: "development" +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.branch }} + + - 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 fetch origin + git reset --hard origin/${{ github.event.inputs.branch }} + cd /etc/compose/apps-beta/ + docker compose down + docker compose up -d + EOF From 8ba8bb80e446f2b0d3126535217a624f9de59202 Mon Sep 17 00:00:00 2001 From: SyniRon <66834451+SyniRon@users.noreply.github.com> Date: Wed, 15 Oct 2025 23:00:02 -0400 Subject: [PATCH 2/3] fix name --- .github/workflows/dev_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dev_deploy.yml b/.github/workflows/dev_deploy.yml index aaef2d5..945a55f 100644 --- a/.github/workflows/dev_deploy.yml +++ b/.github/workflows/dev_deploy.yml @@ -1,4 +1,4 @@ -name: Build and Push Docker Image +name: Development Deploy on: workflow_dispatch: From 7ae32069f29655271b03bc63d90e838e71eca09f Mon Sep 17 00:00:00 2001 From: SyniRon <66834451+SyniRon@users.noreply.github.com> Date: Wed, 15 Oct 2025 23:06:47 -0400 Subject: [PATCH 3/3] fix name 2 --- .github/workflows/old_dev_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/old_dev_deploy.yml b/.github/workflows/old_dev_deploy.yml index 97213e5..2a092fe 100644 --- a/.github/workflows/old_dev_deploy.yml +++ b/.github/workflows/old_dev_deploy.yml @@ -1,4 +1,4 @@ -name: Development Deploy +name: (DO NOT USE)Old Development Deploy on: workflow_dispatch: