diff --git a/.github/workflows/deply.yml b/.github/workflows/deply.yml new file mode 100644 index 00000000..36255675 --- /dev/null +++ b/.github/workflows/deply.yml @@ -0,0 +1,23 @@ +name: Deploy + +on: + push: + branches: + - main + +jobs: + push_to_target_repository: + runs-on: ubuntu-latest + + steps: + - name: Checkout source repository + uses: actions/checkout@v2 + + - name: Push to dokku + run: | + mkdir ~/.ssh + echo "$HOST_KEY" > ~/.ssh/known_hosts + echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa + chmod 0400 ~/.ssh/id_rsa + git remote add dokku dokku@v2.discours.io:discoursio-api + git push dokku HEAD:main diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index af27e212..00000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -stages: - - deploy - -variables: - APP_NAME: discoursio-api - SERVER: v2.discours.io - -deploy: - image: - name: alpine/git - entrypoint: [""] - stage: deploy - environment: - name: production - url: https://v2.discours.io - only: - - main - script: - - mkdir ~/.ssh - - echo "${HOST_KEY}" > ~/.ssh/known_hosts - - echo "${SSH_PRIVATE_KEY}" > ~/.ssh/id_rsa - - chmod 0400 ~/.ssh/id_rsa - - git remote add dokku dokku@$SERVER:$APP_NAME - - git push dokku HEAD:main