Skip to content

CI / Deploy

CI / Deploy #51

Workflow file for this run

name: CI / Deploy
on:
workflow_dispatch:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Set up known_hosts file
run: |
mkdir -p ~/.ssh/ && touch ~/.ssh/known_hosts
ssh-keyscan -t rsa ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_KEY }}
- name: Run deploy script
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} 'cd ${{ secrets.DEPLOY_PATH }} && ./deploy.sh'