search for autocomplate of category
This commit is contained in:
@@ -14,34 +14,6 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Compress repository
|
||||
run: |
|
||||
TIMESTAMP=$(date +%Y%m%d-%H%M%S)
|
||||
ARCHIVE_NAME="repo-backup-${TIMESTAMP}.tar.gz"
|
||||
tar -czf "../${ARCHIVE_NAME}" \
|
||||
--exclude='.git' \
|
||||
--exclude='node_modules' \
|
||||
--exclude='*.log' \
|
||||
.
|
||||
mv "../${ARCHIVE_NAME}" .
|
||||
echo "ARCHIVE_NAME=${ARCHIVE_NAME}" >> $GITHUB_ENV
|
||||
|
||||
- name: Send compressed file via email
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y sendemail libio-socket-ssl-perl libnet-ssleay-perl
|
||||
|
||||
sendemail \
|
||||
-f ftp.notif.manager@gmail.com \
|
||||
-t byeto.net@gmail.com \
|
||||
-u "🚀 Deployment Backup - $(date +%Y-%m-%d)" \
|
||||
-m "Deployment backup from commit: ${{ github.sha }}\nBranch: ${{ github.ref_name }}\nRepository: ${{ github.repository }}\nTimestamp: $(date)" \
|
||||
-s smtp.gmail.com:587 \
|
||||
-xu ftp.notif.manager@gmail.com \
|
||||
-xp ldufbjmidlsosmgq \
|
||||
-o tls=yes \
|
||||
-a "${{ env.ARCHIVE_NAME }}"
|
||||
|
||||
- name: Copy files to server
|
||||
uses: appleboy/scp-action@v0.1.6
|
||||
with:
|
||||
@@ -65,6 +37,7 @@ jobs:
|
||||
mkdir -p /root/hshop/frontend/
|
||||
printf "%s" "${{ secrets.FRONTEND_ENV }}" > /root/hshop/frontend/.env
|
||||
|
||||
|
||||
- name: Build and start Docker containers
|
||||
uses: appleboy/ssh-action@v0.1.6
|
||||
with:
|
||||
@@ -95,5 +68,7 @@ jobs:
|
||||
username: ${{ secrets.SSH_USER }}
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
script: |
|
||||
|
||||
docker image prune -af --filter "until=48h" || { echo "ERROR: ارور در پاک کردن images";}
|
||||
|
||||
docker builder prune -af --filter "until=48h" || { echo "ERROR: ارور در پاک کردن builder cache";}
|
||||
@@ -297,7 +297,7 @@ class ProductModelAdmin(ProductAdminPermission, ModelAdmin, ImportExportModelAdm
|
||||
search_fields = ['name', 'description', ]
|
||||
list_filter = ['show', ('category', RelatedDropdownFilter), 'show_in_bot', ('category__parent', RelatedDropdownFilter)]
|
||||
list_filter_submit = True
|
||||
autocomplete_fields = ['related_products', 'shop']
|
||||
autocomplete_fields = ['related_products', 'shop', 'category']
|
||||
# compressed_fields = True
|
||||
warn_unsaved_form = True
|
||||
# list_per_page = 2
|
||||
|
||||
Reference in New Issue
Block a user