add cicd
Build and Deploy Docker / build (push) Failing after 14m19s
Build and Deploy Docker / deploy (push) Has been skipped

This commit is contained in:
2026-07-14 08:05:08 +02:00
parent 4388a7ec93
commit d9bf86598b
2 changed files with 51 additions and 10 deletions
+51
View File
@@ -0,0 +1,51 @@
name: Build and Deploy Docker
on:
push:
branches:
- masterApi
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: git.rhost.ovh
username: ${{ github.actor }}
password: ${{ secrets.TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./services/www/Dockerfile
push: true
tags: git.rhost.ovh/${{ github.repository }}:latest
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy via SSH
uses: appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.SERVER_HOST }}
port: ${{ secrets.SERVER_PORT }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SERVER_SSH_KEY }}
script: |
cd /home/ryjek/docker/sprawozdania
docker compose pull
docker compose up -d
docker compose exec --workdir /var/www/html www APP_RUNTIME_ENV=prod php bin/console secrets:decrypt-to-local --force
docker compose exec --workdir /var/www/html www php ./bin/console doctrine:migration:migrate --dry-run
docker compose exec --workdir /var/www/html www php ./bin/console cache:clear
-10
View File
@@ -38,16 +38,6 @@ services:
- internal - internal
volumes: volumes:
- ./storage/redis:/data - ./storage/redis:/data
# wait_for_it:
# build:
# context: .
# dockerfile: services/wait_for_it/Dockerfile
# networks:
# - internal
# depends_on:
# - database
# command: sh -c "/wait -t 30 database:5432 -- echo 123;"
networks: networks:
internal: internal:
internal: true internal: true