Add GitHub Actions workflow for building and deploying the fitness app, including backend and frontend image builds, and application restart steps. Update assembly informational version for API project.
Build and Deploy Fitness App / build-and-deploy (push) Failing after 56s
Build and Deploy Fitness App / build-and-deploy (push) Failing after 56s
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
name: Build and Deploy Fitness App
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
# Der Runner braucht Zugriff auf Docker und dein Projektverzeichnis
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /opt/fitness:/opt/fitness
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
# Holt den neuesten Code aus deinem Repository in den Runner
|
||||
|
||||
- name: Build Backend Image
|
||||
run: |
|
||||
docker build -f apps/api/Dockerfile -t fitness-api:latest .
|
||||
|
||||
- name: Build Frontend Image
|
||||
run: |
|
||||
docker build -f apps/web/Dockerfile -t fitness-web:latest .
|
||||
|
||||
- name: Restart Application
|
||||
run: |
|
||||
cd /opt/fitness
|
||||
docker compose down
|
||||
docker compose up -d
|
||||
|
||||
Reference in New Issue
Block a user