Skip to content

Merge pull request #3 from kompoth/sqlcache #2

Merge pull request #3 from kompoth/sqlcache

Merge pull request #3 from kompoth/sqlcache #2

Workflow file for this run

name: Deploy
on:
workflow_dispatch:
push:
branches: [ main ]
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"