From c50e77c2ada152ea9bec9321390ec6bb8c298c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Mih=C3=A1lik?= Date: Tue, 21 May 2024 19:25:09 +0200 Subject: [PATCH] Add deployment from pipeline --- .github/workflows/deploy.yaml | 16 ++++++++++++++++ compose.yaml | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deploy.yaml diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..162011f --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,16 @@ +name: Deploy + +on: push + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: wshihadeh/docker-deployment-action@v2 + with: + remote_docker_host: webstrom@server.strom.sk + ssh_private_key: ${{ secrets.WEBSTROM_DEPLOY_SSH_PRIVATE_KEY }} + ssh_public_key: ${{ secrets.WEBSTROM_DEPLOY_SSH_PUBLIC_KEY }} + stack_file_name: compose.yaml + args: up --build --force-recreate --detach diff --git a/compose.yaml b/compose.yaml index a2d0276..f5dcd0b 100644 --- a/compose.yaml +++ b/compose.yaml @@ -8,7 +8,7 @@ services: volumes: - "staticfiles:/app/static" - type: "bind" - source: "./db.sqlite3" + source: "/data/www/sutazeStrom/db.sqlite3" target: "/app/db.sqlite3" restart: always @@ -23,4 +23,4 @@ services: restart: always volumes: - staticfiles: \ No newline at end of file + staticfiles: