Skip to content

Commit

Permalink
third test for deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
leoBitto committed Oct 12, 2024
1 parent d861dc2 commit b167599
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 107 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create Django Superuser
name: 04.Create Django Superuser

on:
workflow_dispatch: # Trigger manual workflow run
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ jobs:
submodules: recursive
token: ${{ secrets.GITHUB_TOKEN }}

- name: Remove old config directory
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.PRIVATE_KEY }}
script: |
rm -r /opt/config/
# Step 2: Creazione dei file di configurazione
- name: Create config directory
uses: appleboy/[email protected]
Expand Down Expand Up @@ -91,7 +100,7 @@ jobs:
username: ${{ secrets.USERNAME }}
key: ${{ secrets.PRIVATE_KEY }}
source: "./docker-compose.prod.yml"
target: "/opt/${{ github.repository }}/"
target: "/opt/"

# Step 4: Pull dei container da GHCR
- name: Pull containers from GHCR
Expand All @@ -102,8 +111,8 @@ jobs:
key: ${{ secrets.PRIVATE_KEY }}
script: |
echo ${{ secrets.GHCR_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
docker-compose -f /opt/${{ github.repository }}/docker-compose.prod.yml pull
docker-compose -f /opt/${{ github.repository }}/docker-compose.prod.yml up -d --force-recreate
docker compose -f /opt/docker-compose.prod.yml pull
docker compose -f /opt/docker-compose.prod.yml up -d --force-recreate
# Step 5: Configurazione di Nginx
- name: SCP Nginx configuration
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/old_cicd_orchestrator.yml

This file was deleted.

67 changes: 0 additions & 67 deletions .github/workflows/old_deploy.yml

This file was deleted.

0 comments on commit b167599

Please sign in to comment.