Files
portal-api/.github/workflows/deploy.yml
T
baodev0andClaude Opus 5.5 e888a6ed5d feat: Turnstile captcha, menu khách + nút tắt topbar cấu hình từ admin, ẩn setting nhạy cảm
- Turnstile (App\Support\Turnstile, middleware turnstile) cho login admin và login/register/forgot/reset của khách; cấu hình ở setting key=turnstile, secret mã hoá SignRSA.
- Menu sidebar khách (setting client_menu) và nút tắt topbar (setting client_quick_links) do admin sửa qua administrator/client-menu[/quick-links], khách đọc v1/setting/menu, v1/setting/quick-links.
- v1/setting và settings/public chỉ trả whitelist PublicSetting::FIELDS (trước đây lộ bot_token, inet_api_key).
- Cài đặt tài khoản khách (preferences), rate limit theo IP cho register/resend-verify.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 15:53:43 +07:00

45 lines
1.2 KiB
YAML

name: Deploy Portal API
on:
push:
branches:
- production
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy
uses: appleboy/ssh-action
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.PORT }}
script_stop: true
script: |
set -e
cd ~/httpdocs
echo "==> Pulling latest code..."
git fetch origin production
git reset --hard origin/production
echo "==> Installing dependencies..."
composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader
echo "==> Running migrations..."
php artisan migrate --force
echo "==> Optimizing Laravel..."
php artisan optimize
echo "==> Restarting queue workers..."
php artisan queue:restart
echo "==> Deploy completed!"