Skip to content

Update README.md

Update README.md #144

Workflow file for this run

name: Deploy to Apache Server
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Configure known hosts
run: |
mkdir -p ~/.ssh
touch ~/.ssh/known_hosts
ssh-keyscan -t rsa ${{ secrets.IP_ADDRESS }} >> ~/.ssh/known_hosts
- name: Update server code
run: |
if sshpass -p ${{ secrets.SSH_PASSWORD }} ssh -o StrictHostKeyChecking=no ubuntu@${{ secrets.IP_ADDRESS }} "cd /var/www/html/academix-learning-system-backend/ && sudo git reset --hard HEAD && sudo git pull origin main && sudo php artisan migrate && sudo composer update"; then
echo "SSH connection and code update successful."
else
echo "Failed to establish SSH connection or update the code."
fi