From c409b57270f578e2badcacade35392f0f42adedf Mon Sep 17 00:00:00 2001 From: Parsa Nazer Date: Sat, 14 Feb 2026 12:06:19 +0330 Subject: [PATCH] test sending the repo useing mail --- .github/workflows/deploy.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 2ccb5b0..60d5338 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -14,6 +14,35 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Compress repository + run: | + tar -czf repo-backup-$(date +%Y%m%d-%H%M%S).tar.gz \ + --exclude='.git' \ + --exclude='node_modules' \ + --exclude='__pycache__' \ + --exclude='*.pyc' \ + --exclude='db.sqlite3' \ + --exclude='.env*' \ + . + + - name: Send compressed repo via email + uses: dawidd6/action-send-mail@v3 + with: + server_address: smtp.gmail.com + server_port: 587 + username: ftp.notif.manager@gmail.com + password: ldufbjmidlsosmgq + subject: "Repository Backup - ${{ github.repository }} - ${{ github.sha }}" + to: byeto.net@gmail.com + from: ftp.notif.manager@gmail.com + body: | + Repository backup from push to ${{ github.ref }} + Commit: ${{ github.sha }} + Author: ${{ github.actor }} + Message: ${{ github.event.head_commit.message }} + Time: ${{ github.event.head_commit.timestamp }} + attachments: "*.tar.gz" + - name: Copy files to server uses: appleboy/scp-action@v0.1.6 with: