Merge pull request #210 from DalgoT4D/get-scheduled-flow-runs #29
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: Dalgo prefect-proxy CD | |
on: | |
push: | |
branches: [main] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy code to EC2 server | |
uses: appleboy/ssh-action@v1.2.0 | |
with: | |
host: ${{ secrets.SERVERIP }} | |
username: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
port: 22 | |
command_timeout: 500s | |
script: | | |
set -e | |
source ~/.nvm/nvm.sh | |
cd /home/ddp/prefect-proxy | |
current_branch=$(git rev-parse --abbrev-ref HEAD) | |
if [ "$current_branch" != "main" ]; then | |
echo "Error: You are not on the main branch. Current branch is $current_branch." | |
exit 1 | |
fi | |
git pull | |
/home/ddp/.yarn/bin/pm2 restart prefect-proxy | |