I know this is not a Laravel question but....I am trying to deploy Laravel app using github actions; but i am geeting the following error message on the deploy.sh file.
err: fatal: could not read Username for 'https://github.com': No such device or address
My deploy.sh looks like this...
#./deploy.sh
set -e
echo 'Deploying....'
#sudo php artisan down --message "App is being updated....please try again in a few min"
sudo git pull https://github.com/MyUserName/MyRepo.git
sudo php artisan migrate --force
sudo php artisan queue:restart
sudo php artisan optimize
#sudo php artisan up
echo 'Deploying completed!'
my Laravel.yml looks like this
#./github/workflows/laravel.yml
name: Push-to-AWS
on:
push:
branches: [ master ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PUSH_TOKEN }}
- name: 🔎 Check IP
run: curl https://api.ipify.org
- name: Deploy to Server 1
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST_DNS }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.PORT }}
script: 'cd /path_to_app && sudo chmod +x deploy.sh && ./deploy.sh'