Fix deploy workflow syntax and add dev branch support

This commit is contained in:
2025-08-01 10:54:44 +03:00
parent 55c1d2bab9
commit 6e663cc097

View File

@@ -4,6 +4,7 @@ on:
push:
branches:
- main
- dev
jobs:
push_to_target_repository:
@@ -17,12 +18,14 @@ jobs:
- uses: webfactory/ssh-agent@v0.8.0
with:
ssh-private-key: ${{ github.action.secrets.SSH_PRIVATE_KEY }}
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Push to dokku
env:
HOST_KEY: ${{ github.action.secrets.HOST_KEY }}
HOST_KEY: ${{ secrets.HOST_KEY }}
run: |
echo $HOST_KEY > ~/.ssh/known_hosts
mkdir -p ~/.ssh
echo "$HOST_KEY" > ~/.ssh/known_hosts
chmod 600 ~/.ssh/known_hosts
git remote add dokku dokku@v2.discours.io:discoursio-api
git push dokku HEAD:main -f