rename #50
This file contains hidden or 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: 🚀 CI/CD HackAi app | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| #First we will see the application build or not , then we will deploy in EC2 | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: 🎉 Deploy in GCP | |
| env: | |
| PRIVATE_KEY: ${{ secrets.PASSWORD }} | |
| HOSTNAME : ${{ secrets.HOST }} | |
| USER_NAME : ${{ secrets.USERNAME }} | |
| run: | | |
| echo "$PRIVATE_KEY" > private_key && chmod 600 private_key | |
| ssh -o StrictHostKeyChecking=no -i private_key ${USER_NAME}@${HOSTNAME} ' | |
| sh /home/imran_baali19/hackai_main/redeploy.sh | |
| ' |