Skip to content

ci: deploy to linode #12

ci: deploy to linode

ci: deploy to linode #12

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/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Copy files to Linode
run: |
scp -r ${GITHUB_WORKSPACE}${{ 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'