update CICD
All checks were successful
Deploy to Production / deploy (push) Successful in 7s

This commit is contained in:
silverpro89
2026-01-21 15:37:58 +07:00
parent 4479e147f4
commit 8c7bc63b6f
37 changed files with 60 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
name: Deploy to Production
on:
push:
branches:
- main
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Deploy to server
run: |
echo "🚀 Deploying to /var/www/html/games"
echo "📁 Current directory: $(pwd)"
echo "📁 GITHUB_WORKSPACE: $GITHUB_WORKSPACE"
# Create base directory
mkdir -p /var/www/html/games/
# Find and deploy all game folders (exclude source, .git, .gitea, etc.)
DEPLOYED_FOLDERS=""
DEPLOYED_URLS=""
for folder in $GITHUB_WORKSPACE/*/; do
folder_name=$(basename "$folder")
# Skip excluded folders
if [[ "$folder_name" == "source" ]] || \
[[ "$folder_name" == ".git" ]] || \
[[ "$folder_name" == ".gitea" ]] || \
[[ "$folder_name" == "node_modules" ]] || \
[[ "$folder_name" == "logs" ]] || \
[[ "$folder_name" == "uploads" ]]; then
echo "⏭️ Skipping: $folder_name"
continue
fi
# Deploy the folder
echo "📦 Deploying: $folder_name"
rsync -av --delete "$folder" "/var/www/html/games/$folder_name/"
DEPLOYED_FOLDERS="$DEPLOYED_FOLDERS $folder_name"
DEPLOYED_URLS="$DEPLOYED_URLS\n 🔗 https://senaai.tech/games/$folder_name/"
done
# Clear console and show only deployment summary
clear
echo ""
echo "=========================================="
echo "🎉 Deployment Completed Successfully!"
echo "=========================================="
echo ""
echo "📍 Deployed URLs:"
echo -e "$DEPLOYED_URLS"
echo ""
echo "=========================================="

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 96 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

View File

Before

Width:  |  Height:  |  Size: 168 B

After

Width:  |  Height:  |  Size: 168 B

View File

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 129 KiB

View File

Before

Width:  |  Height:  |  Size: 169 KiB

After

Width:  |  Height:  |  Size: 169 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 MiB

After

Width:  |  Height:  |  Size: 2.5 MiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 158 KiB

After

Width:  |  Height:  |  Size: 158 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 162 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View File

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB