Merge pull request #14 from ismail-kharrobi/DEV-FRONT #9
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 server | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'backend/**' | |
- 'frontend/**' | |
- 'nginx/**' | |
jobs: | |
staging_deploy: | |
runs-on : ubuntu-latest | |
environment: | |
name: Staging | |
url: http://142.93.161.63 | |
steps: | |
- name: executing remote ssh commands using ssh key On satging | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USER }} | |
key: ${{ secrets.PRIVATE_KEY }} | |
script: '/root/execute.sh' | |
production_deploy: | |
runs-on : ubuntu-latest | |
needs: staging_deploy | |
environment: | |
name: Production | |
url: http://164.92.243.105 | |
steps: | |
- name: executing remote ssh commands using ssh key on production | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USER }} | |
key: ${{ secrets.PRIVATE_KEY }} | |
script: '/root/execute.sh' | |