github에서 웹서버로 action 설정
본문
pc에서 제작한 코드를 github로 push 한후에
push 된 소스코드를 master로 병합하면
개발서버로 병합한 소스코드가 적용되게 하는 스크립트입니다.
# This is a basic workflow to help you get started with Actions
name: CH GROUP 개발서버 CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the dev branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name : GROUP 개발서버 CI
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port : ${{ secrets.PORT }}
script: |
cd /home/lsc/dev/git_test
git pull https://${{ secrets.TOKEN }}@github주소
이렇게 작성을 해서 실행하면
ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
오류가 납니다.
어떻게 해결해야 할까요?