From 84b86d3605b86dc277ed223a62e905bf311b9823 Mon Sep 17 00:00:00 2001 From: martingaldeca Date: Fri, 23 Jan 2026 19:11:01 +0100 Subject: [PATCH 1/5] * Fix network * Add cd --- .github/issue-branch.yml | 10 ---------- .github/workflows/{ci.yml => cicd.yml} | 21 +++++++++++++++++++++ .github/workflows/create-branch.yml | 13 ------------- .gitignore | 1 + compose.yml | 7 +++++++ 5 files changed, 29 insertions(+), 23 deletions(-) delete mode 100644 .github/issue-branch.yml rename .github/workflows/{ci.yml => cicd.yml} (70%) delete mode 100644 .github/workflows/create-branch.yml diff --git a/.github/issue-branch.yml b/.github/issue-branch.yml deleted file mode 100644 index 6fd8ad1..0000000 --- a/.github/issue-branch.yml +++ /dev/null @@ -1,10 +0,0 @@ -branchName: '${issue.number}-${issue.title}' -branches: - - label: bug - prefix: fix/ - - label: enhancement - prefix: feature/ - - label: chore - prefix: chore/ - - label: '*' - prefix: other/ diff --git a/.github/workflows/ci.yml b/.github/workflows/cicd.yml similarity index 70% rename from .github/workflows/ci.yml rename to .github/workflows/cicd.yml index 1678d1a..81d9b2d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/cicd.yml @@ -60,3 +60,24 @@ jobs: files: ./src/coverage.xml fail_ci_if_error: true verbose: true + deploy: + name: Deploy to server + runs-on: ubuntu-latest + needs: quality-assurance + if: success() && github.ref == 'refs/heads/production' + + steps: + - name: Deploy via SSH + uses: appleboy/ssh-action@v1.2.4 + with: + host: ${{ secrets.PROD_HOST }} + username: ${{ secrets.PROD_USER }} + key: ${{ secrets.PROD_SSH_KEY }} + port: 22 + script: | + cd /home/ideologicalatlas/backend + git fetch --all + git reset --hard origin/production + printf "%s" "${{ secrets.ENV_FILE }}" > .env + docker compose up -d --build --remove-orphans + docker image prune -f diff --git a/.github/workflows/create-branch.yml b/.github/workflows/create-branch.yml deleted file mode 100644 index bff747d..0000000 --- a/.github/workflows/create-branch.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Create Issue Branch -on: - issues: - types: [assigned] - -jobs: - create_branch: - runs-on: ubuntu-latest - steps: - - name: Create Issue Branch - uses: robvanderleek/create-issue-branch-action@v3 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 525e7d6..44c5aab 100644 --- a/.gitignore +++ b/.gitignore @@ -136,6 +136,7 @@ celerybeat.pid # Environments .env +.env-prod .envrc .venv env/ diff --git a/compose.yml b/compose.yml index 2839385..608b17d 100644 --- a/compose.yml +++ b/compose.yml @@ -16,3 +16,10 @@ services: options: max-size: 50m max-file: "2" + networks: + - app_network + +networks: + app_network: + name: ${PROJECT_NAME}_network + driver: bridge From ab2622487fa933ed4503b2703a66dcb4a61e47c2 Mon Sep 17 00:00:00 2001 From: martingaldeca Date: Fri, 23 Jan 2026 19:12:14 +0100 Subject: [PATCH 2/5] * test --- .github/workflows/cicd.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 81d9b2d..2fefaf7 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -64,7 +64,7 @@ jobs: name: Deploy to server runs-on: ubuntu-latest needs: quality-assurance - if: success() && github.ref == 'refs/heads/production' + if: success() && github.ref == 'refs/heads/7-feat-production-deployment' steps: - name: Deploy via SSH @@ -75,9 +75,9 @@ jobs: key: ${{ secrets.PROD_SSH_KEY }} port: 22 script: | - cd /home/ideologicalatlas/backend + cd /home/ideologicalatlas/notifications git fetch --all - git reset --hard origin/production + git reset --hard origin/7-feat-production-deployment printf "%s" "${{ secrets.ENV_FILE }}" > .env docker compose up -d --build --remove-orphans docker image prune -f From 1dea7bf02ce5b5538026133a6cb5273ee6fe6b89 Mon Sep 17 00:00:00 2001 From: martingaldeca Date: Fri, 23 Jan 2026 22:30:20 +0100 Subject: [PATCH 3/5] * update logo image --- src/templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates/base.html b/src/templates/base.html index a937cac..ed43372 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -30,7 +30,7 @@
- {{ project_name }} + {{ project_name }}
From fd4c135e35b475e2cdbe41a907f050b41e08fe0f Mon Sep 17 00:00:00 2001 From: martingaldeca Date: Fri, 23 Jan 2026 23:21:20 +0100 Subject: [PATCH 4/5] * Fix docker networks --- compose.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compose.yml b/compose.yml index 608b17d..5624be4 100644 --- a/compose.yml +++ b/compose.yml @@ -17,9 +17,9 @@ services: max-size: 50m max-file: "2" networks: - - app_network + - global_net networks: - app_network: - name: ${PROJECT_NAME}_network - driver: bridge + global_net: + name: ideological_global_network + external: true From 32f7e6ad3decfe523589e22225ba43773cc8adb3 Mon Sep 17 00:00:00 2001 From: martingaldeca Date: Sat, 24 Jan 2026 00:39:43 +0100 Subject: [PATCH 5/5] * Use production branch --- .github/workflows/cicd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 2fefaf7..20fe84a 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -64,7 +64,7 @@ jobs: name: Deploy to server runs-on: ubuntu-latest needs: quality-assurance - if: success() && github.ref == 'refs/heads/7-feat-production-deployment' + if: success() && github.ref == 'refs/heads/productiont' steps: - name: Deploy via SSH @@ -77,7 +77,7 @@ jobs: script: | cd /home/ideologicalatlas/notifications git fetch --all - git reset --hard origin/7-feat-production-deployment + git reset --hard origin/productiont printf "%s" "${{ secrets.ENV_FILE }}" > .env docker compose up -d --build --remove-orphans docker image prune -f