Skip to content

ci: deploy to linode #2

ci: deploy to linode

ci: deploy to linode #2

Workflow file for this run

name: Deploy to Linode via SSH
on:
push:
branches:
- main # Change to your main branch name
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: 'recursive' # Clone submodules
- name: Set up SSH
uses: webfactory/ssh-agent
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Copy files to Linode
run: |
scp -r ./* ${{ secrets.USER }}@${{ secrets.LINODE_IP }}:${{ secrets.PATH_TO_SAVE }}
ssh ${{ secrets.USER }}@${{ secrets.LINODE_IP }} 'cd /home/ferran/refuapp && docker-compose pull && docker-compose up -d'