Files
core/.gitea/workflows/main.yml
Untone 6f7be9e38c
Some checks failed
Deploy on push / deploy (push) Failing after 5s
fix-deploy
2025-08-12 12:49:48 +03:00

42 lines
1.3 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.
name: 'Deploy on push'
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Cloning repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Repo Name
id: repo_name
run: echo "::set-output name=repo::$(echo ${GITHUB_REPOSITORY##*/})"
- name: Get Branch Name
id: branch_name
run: echo "::set-output name=branch::$(echo ${GITHUB_REF##*/})"
- name: Push to dokku for main branch
if: github.ref == 'refs/heads/main'
uses: dokku/github-action@master
with:
branch: 'main'
git_remote_url: 'ssh://dokku@v2.discours.io:22/discoursio-api'
ssh_private_key: ${{ secrets.PROD_PRIVATE_KEY }}
- name: Push to dokku for main branch
if: github.ref == 'refs/heads/dev'
run: |
# Настройка Git
git config --global user.email "ci@dev.discours.io"
git config --global user.name "CI Bot"
# Добавление удаленного репозитория Dokku
git remote add dokku ssh://dokku@staging.discours.io:22/core
# Push с отключением проверки хоста
GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" \
git push -f dokku dev:main --force