feat: gitea workflow push repo in v2 if main and to staging if dev
Some checks failed
Deploy on Push / deploy (push) Failing after 4s
Some checks failed
Deploy on Push / deploy (push) Failing after 4s
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
name: 'deploy'
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
name: 'Deploy on Push'
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
@@ -21,10 +18,19 @@ jobs:
|
||||
id: branch_name
|
||||
run: echo "::set-output name=branch::$(echo ${GITHUB_REF##*/})"
|
||||
|
||||
- name: Push to dokku
|
||||
- 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@staging.discours.io:22/${{ steps.repo_name.outputs.repo }}'
|
||||
git_remote_url: 'ssh://dokku@v2.discours.io:22/uploader'
|
||||
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
git_push_flags: '--force'
|
||||
|
||||
- name: Push to dokku for staging branch
|
||||
if: github.ref == 'refs/heads/dev'
|
||||
uses: dokku/github-action@master
|
||||
with:
|
||||
branch: 'main'
|
||||
git_remote_url: 'ssh://dokku@stagging.discours.io:22/uploader'
|
||||
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
|
||||
|
Reference in New Issue
Block a user