I've been trying to deploy my laravel application through CICD with Github Actions to Godaddy and my deployment kept on failing and I am seeing this :
drone-scp version: v1.6.14 tar all files into /tmp/zyZUEoEtCt.tar.gz remote server os type is unix scp file to server. create folder ~/public_html drone-scp error: tput: No value for $TERM and no -T specified drone-scp rollback: remove all target tmp file remove file zyZUEoEtCt.tar.gz 2024/03/16 06:12:46 tput: No value for $TERM and no -T specified
here's my deploy.yml :
name: Deploy WCP to godaddy in feature branch
on:
push:
branches:
- features/dev-godaddy # Trigger deployment on pushes to this branch
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2' # Match the PHP version to your project requirements
extensions: mbstring, xml, ctype, iconv, intl, pdo_mysql, gd, mysqli, curl
ini-values: post_max_size=256M, upload_max_filesize=256M
coverage: none
- name: Install Composer dependencies
run: composer install --no-dev --optimize-autoloader
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20.11.1' # Match the Node version to your project requirements
- name: Install NPM dependencies
run: npm install
- name: Build Node frontend
run: npm run dev
- name: Deploy to GoDaddy
uses: appleboy/scp-action@master
with:
host: ${{ secrets.GODADDY_SSH_HOST }}
username: ${{ secrets.GODADDY_SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
source: "."
target: "~/public_html" # Adjust this to your specific path
- name: SSH commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.GODADDY_SSH_HOST }}
username: ${{ secrets.GODADDY_SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
script:
cd ~/public_html
I've tried these (all didn't work):
- Adding these lines before the Deploy to GoDaddy step in my workflow:
- name: Set terminal type
run: export TERM=xterm
- Adding these lines before the Deploy to GoDaddy step in my workflow:
- name: Set terminal type
run: export TERM=vt100
- Modified this portion:
- name: SSH commands
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.GODADDY_SSH_HOST }}
username: ${{ secrets.GODADDY_SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: 22
script:
export TERM=xterm
cd ~/public_html
# Any other post-deployment commands you might need
# For example, clearing cache:
# php artisan cache:clear
My research so far says that the issue is related to the terminal environment during the execution of the drone-scp action, which is used by the appleboy/scp-action GitHub Action being used for deployment. But everything doesn't work well with me, I should be missing something. I'll appreciate any help. Thank you.