Skip to content

Instantly share code, notes, and snippets.

@mishajib
Last active March 7, 2023 06:06
Show Gist options
  • Save mishajib/1e7af7b2cab51a6089acc58abf9b2cac to your computer and use it in GitHub Desktop.
Save mishajib/1e7af7b2cab51a6089acc58abf9b2cac to your computer and use it in GitHub Desktop.
By this application can deploy using ssh
name: Deploy website on push in production server
on:
push:
branches:
- production
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@master
with:
debug: false
host: ${{ secrets.C_HOST }}
username: ${{ secrets.C_USERNAME }}
# port: 21098
key: ${{ secrets.SSH_KEY }}
passphrase: ${{ secrets.C_PASSWORD }}
script: |
cd public_html/api/
php artisan down
git pull origin production
composer install
php artisan o:c
php artisan migrate
php artisan up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment