1
1
mirror of https://github.com/neosubhamoy/neosubhamoy-portfolio.git synced 2025-12-19 23:59:35 +05:30

(CI/CD): added drop script to clean database before updating

This commit is contained in:
2023-12-03 20:35:08 +05:30
parent d66e5eafcd
commit f27ee5b9cb
2 changed files with 7 additions and 1 deletions

View File

@@ -2,6 +2,7 @@ on:
push:
branches:
- main
name: 🚀 Deploy website on server
jobs:
web-deploy:
@@ -12,7 +13,9 @@ jobs:
uses: actions/checkout@v3
- name: 📦 Update Database
run: mysql -h ${{ secrets.DB_HOST }} --port 3306 -u${{ secrets.DB_USERNAME }} -p${{ secrets.DB_PASSWORD }} -D${{ secrets.DB_NAME }} -e "source neosubhamoy.sql"
run: |
mysql -h ${{ secrets.DB_HOST }} --port 3306 -u${{ secrets.DB_USERNAME }} -p${{ secrets.DB_PASSWORD }} -D${{ secrets.DB_NAME }} -e "source drop_script.sql"
mysql -h ${{ secrets.DB_HOST }} --port 3306 -u${{ secrets.DB_USERNAME }} -p${{ secrets.DB_PASSWORD }} -D${{ secrets.DB_NAME }} -e "source neosubhamoy.sql"
- name: 📂 Sync files
uses: SamKirkland/FTP-Deploy-Action@v4.3.4