freetravel/.gitea/workflows/deploy.yml
Peppa 20028b790b
All checks were successful
peppa/lint lint: success за 1с
peppa/typecheck typecheck: success за 2с
peppa/test test: success за 1с
peppa/build build: success за 1с
ci / checks (pull_request) Successful in 15s
deploy / deploy (pull_request) Successful in 13s
FRTVL-2: регулярный поиск раз в сутки и уведомления в Телеграм
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-14 22:59:33 +05:00

42 lines
2.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# CD проекта Пеппы (PEP-57): preview на PR (удаляется при закрытии), staging на мерж в main,
# прод — тег deploy-prod-* (его ставит Пеппа по кнопке PM). Настройки — .peppa/project.json →
# "deploy"; без них шаг пропускается. Изменение файла PM видит отдельно.
name: deploy
on:
push:
branches: [main]
tags: ["deploy-prod-*"]
pull_request:
types: [opened, synchronize, reopened, closed]
env:
PEPPA_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
PEPPA_BRANCH: ${{ github.head_ref || github.ref_name }}
PEPPA_PR: ${{ github.event.pull_request.number }}
PEPPA_PR_ACTION: ${{ github.event.action }}
PEPPA_CI_SECRET: ${{ secrets.PEPPA_CI_SECRET }}
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Секреты приложения FRTVL (передаются в контейнер через deploy/compose.yml).
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
SEARCH_TOKEN: ${{ secrets.SEARCH_TOKEN }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_BOT_USERNAME: ${{ secrets.TELEGRAM_BOT_USERNAME }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
jobs:
deploy:
# Раннер с docker.sock хоста: только ветки этого репозитория, PR из форков не запускаются.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: peppa-trusted
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.PEPPA_SHA }}
fetch-depth: 0
- name: deploy
run: |
if [[ "$GITHUB_EVENT_NAME" == pull_request ]]; then
[[ "$PEPPA_PR_ACTION" == closed ]] && exec bash .gitea/peppa-deploy.sh preview-down
exec bash .gitea/peppa-deploy.sh preview
fi
[[ "$GITHUB_REF" == refs/tags/deploy-prod-* ]] && exec bash .gitea/peppa-deploy.sh prod
exec bash .gitea/peppa-deploy.sh staging