Skip to content

Added deploy configuration #1

Added deploy configuration

Added deploy configuration #1

Workflow file for this run

name: Host-deploy
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Copy files via ssh
uses: appleboy/scp-action@master
with:
host: ${{ vars.SSH_HOST }}
username: ${{ vars.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
source: '*'
target: '${{ vars.SSH_PROJECT_FOLDER }}'
- name: Run commands via ssh
uses: appleboy/ssh-action@master
with:
host: ${{ vars.SSH_HOST }}
username: ${{ vars.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
script: |
cd ${{ vars.SSH_PROJECT_FOLDER }}
docker-compose up -d --remove-orphans