feat: add CI to main for deploy on discoursio-api
This commit is contained in:
parent
025019b544
commit
9d8bd629ab
25
.gitea/workflows/main.yml
Normal file
25
.gitea/workflows/main.yml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
name: 'deploy'
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Cloning repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Get Branch Name
|
||||||
|
id: branch_name
|
||||||
|
run: echo "::set-output name=branch::$(echo ${GITHUB_REF##*/})"
|
||||||
|
|
||||||
|
- name: Push to dokku
|
||||||
|
uses: dokku/github-action@master
|
||||||
|
with:
|
||||||
|
ssh-private-key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}
|
||||||
|
ssh-host: staging.discours.io
|
||||||
|
ssh-user: dokku
|
||||||
|
app-name: ${{ steps.branch_name.outputs.branch == 'main' ? 'discoursio-api' : 'core' }}
|
||||||
|
git-remote-url: ${{ steps.branch_name.outputs.branch == 'main' ? 'ssh://dokku@staging.discours.io:22/discoursio-api' : 'ssh://dokku@staging.discours.io:22/core' }}
|
Loading…
Reference in New Issue
Block a user