17 lines
670 B
Bash
Executable File
17 lines
670 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# Собираем dist/index.html (CSS + JS встроены)
|
|
~/lang/.venv/bin/python3 ~/lang/build.sh
|
|
|
|
# Вклеиваем Groq API ключ в dist/index.html
|
|
KEY=$(cat ~/lang/token.txt)
|
|
cp ~/lang/dist/index.html /tmp/lyngvo_index.html
|
|
sed -i "s|const GROQ_API_KEY = '';|const GROQ_API_KEY = '${KEY}';|" /tmp/lyngvo_index.html
|
|
|
|
# Деплой на германскую ВМ (nginx + Groq прокси)
|
|
scp -i ~/.ssh/vultr_openssh -o StrictHostKeyChecking=no /tmp/lyngvo_index.html root@95.179.252.111:/var/www/lyngvo/index.html
|
|
|
|
rm -f /tmp/lyngvo_index.html
|
|
echo "\n=== Деплой завершён. Проверяй https://lang.kube5s.ru ==="
|