Skip to content

Merge pull request #22 from SoftBananas/ci-cd #7

Merge pull request #22 from SoftBananas/ci-cd

Merge pull request #22 from SoftBananas/ci-cd #7

Workflow file for this run

name: Deploy
on:
push:
branches: [ main-banana ]
jobs:
push_to_registry:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Log in to Docker Hub
uses: docker/login-action@v3.0.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
server_update:
needs: push_to_registry
name: Update server by ssh
runs-on: ubuntu-latest
steps:
- name: Connect and run script
uses: SoftBananas/ssh-action@v1.0.3
with:
host: ${{ secrets.SERVER_HOST }}
port: ${{ secrets.SERVER_PORT }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script_stop: true
script: bash scripts/deploy.sh