Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 19, 2025

Implements automated deployment to remote server on push to main branch via SSH, executing Docker Compose build/deploy cycle and image cleanup.

Changes

  • .github/workflows/deploy.yml: GitHub Action that SSH into remote server, pulls latest code, runs docker-compose build && docker-compose up -d, and prunes old images (24h+ and dangling)

    • Uses appleboy/ssh-action@v1.0.3 for SSH execution
    • Requires secrets: DEPLOY_HOST, DEPLOY_USER, DEPLOY_SSH_KEY, DEPLOY_PATH, DEPLOY_PORT (optional)
    • Sets permissions: contents: read for minimal GITHUB_TOKEN scope
  • docker-compose.yml: Defines Flask service with port 5000, restart policy, and environment variables

  • README.md: Documents deployment workflow and required GitHub secrets

Deployment Flow

on:
  push:
    branches: [main]
    
script: |
  cd ${{ secrets.DEPLOY_PATH }}
  git pull origin main
  docker-compose build
  docker-compose up -d
  docker image prune -a -f --filter "until=24h"

Repository owner must configure the five GitHub secrets before workflow activates.

Original prompt

This section details on the original issue you should resolve

<issue_title>Deploy action auf main</issue_title>
<issue_description>Erstelle eine gh Action, die vie ssh ko,,Amos ausführt:
docker-compose Build, docker-compose up -d auf einem Remote Server ausführt und alte docker images aus diese, context löscht.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits November 19, 2025 17:29
Co-authored-by: MaStr <1036501+MaStr@users.noreply.github.com>
Co-authored-by: MaStr <1036501+MaStr@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitHub Action for deployment via SSH Add GitHub Actions deployment workflow with SSH and Docker Compose Nov 19, 2025
Copilot AI requested a review from MaStr November 19, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deploy action auf main

2 participants