Last active
March 7, 2023 06:06
-
-
Save mishajib/1e7af7b2cab51a6089acc58abf9b2cac to your computer and use it in GitHub Desktop.
By this application can deploy using ssh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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