add deploy
Build and Deploy Docker / build (push) Failing after 15m9s
Build and Deploy Docker / deploy (push) Has been skipped

This commit is contained in:
2026-08-25 17:06:05 +02:00
parent 2eb770a328
commit bef962c5d0
3 changed files with 54 additions and 1 deletions
+52
View File
@@ -0,0 +1,52 @@
name: Build and Deploy Docker
on:
push:
branches:
- master
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 }}:full
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 full
docker compose up -d full
docker compose exec --workdir /var/www/html full APP_RUNTIME_ENV=prod php bin/console secrets:decrypt-to-local --force
docker compose exec --workdir /var/www/html full php ./bin/console doctrine:migration:migrate --dry-run
docker compose exec --workdir /var/www/html full php ./bin/console lexik:jwt:generate-keypair --skip-if-exists
docker compose exec --workdir /var/www/html full php ./bin/console cache:clear
+1 -1
View File
@@ -14,7 +14,7 @@ services:
- internal - internal
- myadmin - myadmin
www: www:
image: registry.docker.rhost.ovh/sprawozdania:0.2.5 image: git.rhost.ovh/ryjek/sprawozdania:full
restart: on-failure restart: on-failure
platform: linux/x86_64 platform: linux/x86_64
build: build:
+1
View File
@@ -17,3 +17,4 @@
npm-debug.log npm-debug.log
yarn-error.log yarn-error.log
###< symfony/webpack-encore-bundle ### ###< symfony/webpack-encore-bundle ###
config/jwt