Skip to content

Commit

Permalink
Deploy WF
Browse files Browse the repository at this point in the history
  • Loading branch information
kompoth committed Aug 29, 2024
1 parent dab1a53 commit e16e4cb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Deploy
on: workflow_dispatch

jobs:
deploy:
name: Deploy application
runs-on: ubuntu-latest
steps:
- name: Prepare SSH
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts
- name: Pull latest
run: |
ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd muckraker && git pull origin main --rebase"
echo "Successfully pulled repo"
- name: Restart container
run: |
ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd muckraker && docker compose stop && docker compose up --build -d"
echo "Successfully restarted container"
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Development
name: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

Expand All @@ -17,10 +15,12 @@ jobs:
with:
python-version: "3.12"
- name: Check with linter
run: pip install ruff==0.5.2 && ruff check
run: |
pip install ruff==0.5.2
ruff check
test:
name: Run tests
name: Run smoke tests
needs: lint
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit e16e4cb

Please sign in to comment.