Skip to content

ci: add linode config #17

ci: add linode config

ci: add linode config #17

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: Update apt cache on the runner and install dependencies
run: sudo apt update && sudo apt install sshpass
- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: copy file via ssh password
uses: appleboy/scp-action@master
with:
host: 172.232.42.111
username: ferran
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
source: ${GITHUB_WORKSPACE}
target: "/home/ferran"
- name: Copy files to Linode
run: |
ssh ${{ secrets.USER }}@${{ secrets.LINODE_IP }} 'ls -la /home/ferran'
# ssh ${{ secrets.USER }}@${{ secrets.LINODE_IP }} 'cd /home/ferran/refuapp && docker-compose pull && docker-compose up -d'