Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dev.khosromanesh's avatar

help to connect to automate github actions

hello everyone

i have a linux vps server, created a repository on github and have a project on my pc

i want whenever i push something from my dev workflow from pc to github, automatically code update to my vps server

here is what i do

in .github/workflows/main.yml

name: Build, test and deploy

on:
  push:
    branches: [ main ]

jobs:
    build:
      runs-on: ubuntu-latest
      steps:
        - name: Checkout
          uses: actions/checkout@v4
          with:
            php-version: 8.3
        - name: Create database
          run: touch ./database/database.sqlite
        - name: deploy using ssh
          uses: appleboy/[email protected]
          with:
            host: ip
            username: linux user
            key: ${{ secrets.DEPLOY_KEY }}
            script: |
              cd /var/www/html/back
              ./build.sh

my actual problem is with this lines

            username: linux user
            key: ${{ secrets.DEPLOY_KEY }}

i don't know how connect Ubuntu to GitHub

and error this when push

2025/02/28 08:06:05 ssh.ParsePrivateKey: ssh: no key found
2025/02/28 08:06:06 ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain
0 likes
1 reply

Please or to participate in this conversation.