Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

ci: Adds CI job to autodeploy docker #17

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,17 @@ jobs:
password: ${{ secrets.DOCKERHUB_PW }}
- name: Push to hub
run: docker push quackai/contribution-api:latest

deploy-dev:
needs: dockerhub
runs-on: ubuntu-latest
steps:
- uses: appleboy/[email protected]
with:
host: ${{ secrets.SSH_DEV_HOST }}
username: ${{ secrets.SSH_DEV_USERNAME }}
key: ${{ secrets.SSH_DEPLOY_DEV }}
script: |
docker pull quackai/contribution-api:latest
cd devops && docker compose stop backend && docker compose up -d
docker inspect -f '{{ .Created }}' $(docker compose images -q backend)
Loading