test sending the repo useing mail

This commit is contained in:
Parsa Nazer
2026-02-14 12:06:19 +03:30
parent 2d296f1561
commit c409b57270
+29
View File
@@ -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: