add ssh action #4
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 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
name: Deploy ${{ github.event.ref }} | |
steps: | |
- name: 🚚 Get latest code | |
uses: actions/checkout@master | |
- name: 📂 Sync files (Production) | |
uses: SamKirkland/FTP-Deploy-Action@master | |
with: | |
server: ${{ secrets.FTP_HOST }} | |
username: ${{ secrets.FTP_USER }} | |
password: ${{ secrets.FTP_PASSWORD }} | |
server-dir: "sistemas/sorteio/app/" | |
ssh-action: | |
needs: deploy | |
name: SSH Action on Sorteio | |
runs-on: ubuntu-latest | |
steps: | |
- name: executing remote ssh commands using password | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.FTP_HOST }} | |
username: ${{ secrets.FTP_USERNAME }} | |
password: ${{ secrets.FTP_PASSWORD }} | |
port: ${{ secrets.PORT }} | |
script: | | |
cd sistemas/sorteio/app/ | |
composer install | |
composer update |