From dbbf49349f0904563aab759255fbbb51fd13c301 Mon Sep 17 00:00:00 2001 From: Benjamin Date: Tue, 9 Jun 2026 10:56:19 +0200 Subject: [PATCH 1/7] Add Staging Deploy --- .gitea/workflows/deploy-staging.yml | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .gitea/workflows/deploy-staging.yml diff --git a/.gitea/workflows/deploy-staging.yml b/.gitea/workflows/deploy-staging.yml new file mode 100644 index 0000000..1472ecb --- /dev/null +++ b/.gitea/workflows/deploy-staging.yml @@ -0,0 +1,39 @@ +name: Deploy Laravel Staging + +on: + push: + branches: [staging] + +jobs: + deploy: + runs-on: self-hosted + + steps: + - name: Mark Git Folder as safe + run: git config --global --add safe.directory /deploy/laravel + + - name: Code pull + run: git -C /deploy/laravel pull origin staging + + - name: Composer Dependencies + run: | + composer install \ + --no-dev \ + --optimize-autoloader + --working-dir=/deploy/laravel + + - name: JS Dependencies + run: cd /deploy/laravel && npm ci + + - name: Build JS/CSS + run: cd /deploy/laravel && npm run build + + - name: Migrations + run: | + docker exec staging_rhpz_web \ + php /sites/laravel/artisan migrate --force + + - name: Opti Laravel + run: | + docker exec staging_rhpz_web \ + php /sites/laravel/artisan optimize From 7509a2ce4e3c0a2a934493cfc38af06ac9c85af4 Mon Sep 17 00:00:00 2001 From: Benjamin Date: Tue, 9 Jun 2026 11:07:16 +0200 Subject: [PATCH 2/7] Update Staging Deploy --- .gitea/workflows/deploy-staging.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deploy-staging.yml b/.gitea/workflows/deploy-staging.yml index 1472ecb..77cec95 100644 --- a/.gitea/workflows/deploy-staging.yml +++ b/.gitea/workflows/deploy-staging.yml @@ -13,14 +13,16 @@ jobs: run: git config --global --add safe.directory /deploy/laravel - name: Code pull + env: + GIT_SSH_COMMAND: "ssh -o StrictHostKeyChecking=no -i /root/.ssh/id_ed25519" run: git -C /deploy/laravel pull origin staging - name: Composer Dependencies run: | composer install \ - --no-dev \ - --optimize-autoloader - --working-dir=/deploy/laravel + --no-dev \ + --optimize-autoloader \ + --working-dir=/deploy/laravel - name: JS Dependencies run: cd /deploy/laravel && npm ci From e3424480d94b03cd5ba2a00b8260fc63abaa5e85 Mon Sep 17 00:00:00 2001 From: Benjamin Date: Tue, 9 Jun 2026 11:16:22 +0200 Subject: [PATCH 3/7] Update Staging Deploy --- .gitea/workflows/deploy-staging.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy-staging.yml b/.gitea/workflows/deploy-staging.yml index 77cec95..c21b88e 100644 --- a/.gitea/workflows/deploy-staging.yml +++ b/.gitea/workflows/deploy-staging.yml @@ -14,7 +14,7 @@ jobs: - name: Code pull env: - GIT_SSH_COMMAND: "ssh -o StrictHostKeyChecking=no -i /root/.ssh/id_ed25519" + GIT_SSH_COMMAND: "ssh -vv -o StrictHostKeyChecking=no -i /root/.ssh/id_ed25519" run: git -C /deploy/laravel pull origin staging - name: Composer Dependencies From 4419e8972f18808644f340c35bb0c5fcbcd652de Mon Sep 17 00:00:00 2001 From: Benjamin Date: Tue, 9 Jun 2026 11:25:16 +0200 Subject: [PATCH 4/7] Update Staging Deploy --- .gitea/workflows/deploy-staging.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy-staging.yml b/.gitea/workflows/deploy-staging.yml index c21b88e..9802311 100644 --- a/.gitea/workflows/deploy-staging.yml +++ b/.gitea/workflows/deploy-staging.yml @@ -9,12 +9,16 @@ jobs: runs-on: self-hosted steps: + - name: Configure Git credentials + run: | + git config --global credential.helper store + echo "https://staging-runner:${{ env.GITEA_TOKEN }}@code.romhackplaza.org" \ + > /root/.git-credentials + - name: Mark Git Folder as safe run: git config --global --add safe.directory /deploy/laravel - name: Code pull - env: - GIT_SSH_COMMAND: "ssh -vv -o StrictHostKeyChecking=no -i /root/.ssh/id_ed25519" run: git -C /deploy/laravel pull origin staging - name: Composer Dependencies From 006cf197cf0397e63cfb1404f575b49220e4eb6b Mon Sep 17 00:00:00 2001 From: Benjamin Date: Tue, 9 Jun 2026 11:26:56 +0200 Subject: [PATCH 5/7] Update Staging Deploy --- .gitea/workflows/deploy-staging.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy-staging.yml b/.gitea/workflows/deploy-staging.yml index 9802311..cef2b65 100644 --- a/.gitea/workflows/deploy-staging.yml +++ b/.gitea/workflows/deploy-staging.yml @@ -19,7 +19,9 @@ jobs: run: git config --global --add safe.directory /deploy/laravel - name: Code pull - run: git -C /deploy/laravel pull origin staging + run: | + git -C /deploy/laravel fetch origin staging + git -C /deploy/laravel reset --hard origin/staging - name: Composer Dependencies run: | From 0e3f3cd55bb9abdd3cbd99f1267134aeb2030614 Mon Sep 17 00:00:00 2001 From: Benjamin Date: Tue, 9 Jun 2026 11:31:38 +0200 Subject: [PATCH 6/7] Update Staging Deploy --- .gitea/workflows/deploy-staging.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy-staging.yml b/.gitea/workflows/deploy-staging.yml index cef2b65..1fda8af 100644 --- a/.gitea/workflows/deploy-staging.yml +++ b/.gitea/workflows/deploy-staging.yml @@ -25,10 +25,10 @@ jobs: - name: Composer Dependencies run: | - composer install \ + docker exec staging_rhpz_web composer install \ --no-dev \ --optimize-autoloader \ - --working-dir=/deploy/laravel + --working-dir=/sites/laravel - name: JS Dependencies run: cd /deploy/laravel && npm ci From 476bb5417c23e03115312b6766820b6d819e1650 Mon Sep 17 00:00:00 2001 From: RHPZAdmin Date: Tue, 9 Jun 2026 09:47:36 +0000 Subject: [PATCH 7/7] Supprimer .gitea/workflows/deploy-staging.yml --- .gitea/workflows/deploy-staging.yml | 47 ----------------------------- 1 file changed, 47 deletions(-) delete mode 100644 .gitea/workflows/deploy-staging.yml diff --git a/.gitea/workflows/deploy-staging.yml b/.gitea/workflows/deploy-staging.yml deleted file mode 100644 index 1fda8af..0000000 --- a/.gitea/workflows/deploy-staging.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Deploy Laravel Staging - -on: - push: - branches: [staging] - -jobs: - deploy: - runs-on: self-hosted - - steps: - - name: Configure Git credentials - run: | - git config --global credential.helper store - echo "https://staging-runner:${{ env.GITEA_TOKEN }}@code.romhackplaza.org" \ - > /root/.git-credentials - - - name: Mark Git Folder as safe - run: git config --global --add safe.directory /deploy/laravel - - - name: Code pull - run: | - git -C /deploy/laravel fetch origin staging - git -C /deploy/laravel reset --hard origin/staging - - - name: Composer Dependencies - run: | - docker exec staging_rhpz_web composer install \ - --no-dev \ - --optimize-autoloader \ - --working-dir=/sites/laravel - - - name: JS Dependencies - run: cd /deploy/laravel && npm ci - - - name: Build JS/CSS - run: cd /deploy/laravel && npm run build - - - name: Migrations - run: | - docker exec staging_rhpz_web \ - php /sites/laravel/artisan migrate --force - - - name: Opti Laravel - run: | - docker exec staging_rhpz_web \ - php /sites/laravel/artisan optimize