- Add UpdateManager and UpdateChecker for automatic version detection - Add post-build script for meta.json generation and version injection - Enhance Service Worker with version-aware caching - Add .htaccess configuration for proper cache control This ensures all users receive the latest version after deployment without manual cache clearing.
48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
name: Deploy Application
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- master
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '18'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build application
|
|
run: npm run build
|
|
|
|
- name: Deploy to server
|
|
# Добавьте ваш процесс деплоя здесь
|
|
# Например: rsync, scp, FTP, etc.
|
|
run: |
|
|
echo "Deploying to server..."
|
|
# Ваш скрипт деплоя
|
|
# Пример для rsync:
|
|
# rsync -avz --delete dist/ user@server:/var/www/securebit-chat/public/
|
|
|
|
# Автоматическая очистка кеша Cloudflare отключена
|
|
# Для ручной очистки используйте: node scripts/purge-cloudflare-cache.js
|
|
# Или очистите кеш через Cloudflare Dashboard
|
|
|
|
- name: Verify deployment
|
|
run: |
|
|
echo "✅ Deployment completed"
|
|
echo "Note: Cloudflare cache purge is disabled. Clear cache manually if needed."
|
|
|