[0.9.28] - OAuth/Auth with httpOnly cookie
All checks were successful
Deploy on push / deploy (push) Successful in 4m32s

This commit is contained in:
2025-09-28 12:22:37 +03:00
parent 6451ba7de5
commit fb98a1c6c8
27 changed files with 1449 additions and 2147 deletions

View File

@@ -90,7 +90,7 @@ jobs:
echo "📝 Запускаем GraphQL codegen..."
npm run codegen 2>&1 | tee codegen_output.log
if [ ${PIPESTATUS[0]} -ne 0 ]; then
echo "❌ GraphQL codegen упал с v3.dscrs.site!"
echo "❌ GraphQL codegen упал с v3.discours.io!"
echo "📋 ПОЛНЫЙ ВЫВОД ОШИБКИ:"
cat codegen_output.log
echo "📋 КОНЕЦ ВЫВОДА ОШИБКИ"
@@ -101,8 +101,8 @@ jobs:
V3_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
-H "Content-Type: application/json" \
-d '{"query":"query{__typename}"}' \
https://v3.dscrs.site/graphql 2>/dev/null || echo "000")
echo "v3.dscrs.site: $V3_STATUS"
https://v3.discours.io/graphql 2>/dev/null || echo "000")
echo "v3.discours.io: $V3_STATUS"
CORETEST_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
-H "Content-Type: application/json" \
@@ -114,7 +114,7 @@ jobs:
if [ "$CORETEST_STATUS" = "200" ]; then
echo "🔄 Переключаемся на coretest.discours.io..."
# Временно меняем схему в codegen.ts
sed -i "s|https://v3.dscrs.site/graphql|https://coretest.discours.io/graphql|g" codegen.ts
sed -i "s|https://v3.discours.io/graphql|https://coretest.discours.io/graphql|g" codegen.ts
npm run codegen 2>&1 | tee fallback_output.log
if [ ${PIPESTATUS[0]} -ne 0 ]; then
echo "❌ Fallback тоже не сработал!"
@@ -122,11 +122,11 @@ jobs:
cat fallback_output.log
echo "📋 КОНЕЦ ВЫВОДА ОШИБКИ FALLBACK"
# Восстанавливаем оригинальную схему
sed -i "s|https://coretest.discours.io/graphql|https://v3.dscrs.site/graphql|g" codegen.ts
sed -i "s|https://coretest.discours.io/graphql|https://v3.discours.io/graphql|g" codegen.ts
exit 1
fi
# Восстанавливаем оригинальную схему
sed -i "s|https://coretest.discours.io/graphql|https://v3.dscrs.site/graphql|g" codegen.ts
sed -i "s|https://coretest.discours.io/graphql|https://v3.discours.io/graphql|g" codegen.ts
else
echo "❌ Оба endpoint недоступны!"
exit 1
@@ -210,22 +210,22 @@ jobs:
echo "${{ secrets.STAGING_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
# Добавляем v3.dscrs.site в known_hosts
ssh-keyscan -H v3.dscrs.site >> ~/.ssh/known_hosts
# Добавляем v3.discours.io в known_hosts
ssh-keyscan -H v3.discours.io >> ~/.ssh/known_hosts
# Запускаем ssh-agent
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa
echo "✅ SSH настроен для v3.dscrs.site"
echo "✅ SSH настроен для v3.discours.io"
- name: Push to dokku for dev branch
if: github.ref == 'refs/heads/dev'
run: |
echo "🚀 Деплоим на v3.dscrs.site..."
echo "🚀 Деплоим на v3.discours.io..."
# Добавляем dokku remote
git remote add dokku ssh://dokku@v3.dscrs.site:22/core || git remote set-url dokku ssh://dokku@v3.dscrs.site:22/core
git remote add dokku ssh://dokku@v3.discours.io:22/core || git remote set-url dokku ssh://dokku@v3.discours.io:22/core
# Проверяем remote
git remote -v