refactor: remove obsolete deploy workflow and comment out caching steps in Docker build workflow
All checks were successful
Build and Push Docker Image / build (push) Successful in 43s

This commit is contained in:
Felix Schlusche
2025-10-24 16:07:27 +02:00
parent ea4bda3658
commit f84867fe1b
2 changed files with 9 additions and 58 deletions

View File

@@ -1,49 +0,0 @@
name: Build and Deploy
on:
push:
branches:
- main
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
run: |
docker build -t timetracker:latest .
docker tag timetracker:latest timetracker:${{ github.sha }}
- name: Save image
run: docker save timetracker:latest | gzip > timetracker.tar.gz
- name: Deploy to server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SERVER_SSH_KEY }}
source: "timetracker.tar.gz,docker-compose.yml"
target: "/opt/timetracker"
- name: Load and restart containers
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SERVER_SSH_KEY }}
script: |
cd /opt/timetracker
docker load < timetracker.tar.gz
docker-compose down
docker-compose up -d
docker system prune -f
rm timetracker.tar.gz

View File

@@ -19,15 +19,15 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Cache Gitea Actions # - name: Cache Gitea Actions
uses: actions/cache@v3 # uses: actions/cache@v3
with: # with:
path: | # path: |
~/.cache/actcache # ~/.cache/actcache
~/.cache/act # ~/.cache/act
key: ${{ runner.os }}-act-${{ hashFiles('**/.gitea/workflows/*.yml') }} # key: ${{ runner.os }}-act-${{ hashFiles('**/.gitea/workflows/*.yml') }}
restore-keys: | # restore-keys: |
${{ runner.os }}-act- # ${{ runner.os }}-act-
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4