Merge pull request #51 from HIGHFIVE-SW/develop #33
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: Deploy with GitHub Actions | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Set execute permissions for deploy script | |
| run: chmod +x ${{ github.workspace }}/deploy_script.sh | |
| - name: Setup SSH Key | |
| run: | | |
| echo "${{ secrets.SSH_PRIVATE_KEY }}" > id_rsa.pem | |
| chmod 600 id_rsa.pem | |
| ssh -i id_rsa.pem -o StrictHostKeyChecking=no [email protected] -p 50735 "cd ~/HIGHFIVE-AI/ && git reset --hard origin/main && git pull origin main && chmod +x deploy_script.sh && ./deploy_script.sh" |