Skip to content

Commit

Permalink
Merge pull request #3 from ginruh/dev
Browse files Browse the repository at this point in the history
feat: updated github worflows
  • Loading branch information
vomaksh authored Jun 16, 2024
2 parents 5fc38c4 + ce4589b commit 993774b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,20 @@ jobs:
file: src/listener/Dockerfile
push: true
tags: ghcr.io/${{ github.repository }}/listener:latest

- name: Setup ssh key
run: |
mkdir -p ~/.ssh/
echo "${{ secrets.ACTION_PRIVATE_KEY }}" > ~/.ssh/github_action.key
sudo chmod 600 ~/.ssh/github_action.key
ssh-keyscan -H ${{ secrets.SERVER_IP }} > ~/.ssh/known_hosts
- name: Deploy
run: |
ssh {{ secrets.SERVER_USERNAME }}@{{ secrets.SERVER_IP }} /bin/bash << EOF
cd {{ secrets.REPO_PATH }};
git pull origin master;
docker compose down;
docker compose pull;
docker compose up -d;
EOF
4 changes: 1 addition & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
services:
listener:
build:
context: .
dockerfile: Dockerfile
image: ghcr.io/ginruh/hckernews/listener:latest

0 comments on commit 993774b

Please sign in to comment.