Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 26 additions & 13 deletions .github/workflows/dev_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ on:
required: true
type: string
default: "development"

jobs:
deploy:
build:
runs-on: ubuntu-latest

steps:
Expand All @@ -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
35 changes: 35 additions & 0 deletions .github/workflows/old_dev_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: (DO NOT USE)Old 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
Loading