Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(workflow): update git & environment settings before deployment #733

Merged
merged 8 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions .github/workflows/aws-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,22 @@ jobs:
- name: deploy to ec2
run: |
ssh -o StrictHostKeyChecking=no -i /tmp/UIUC.pem [email protected] << 'EOF'
cd ~/research-town/backend/
cd ~/research-town/
git fetch origin
git reset --hard origin/main
sed -i 's|^base_llm:.*|base_llm: together_ai/Qwen/Qwen1.5-72B-Chat|' ~/research-town/configs/param.yaml
cd backend/
source ~/.bashrc
conda activate research_town
git pull origin main
tmux send-keys -t 0 C-c
sleep 5
tmux has-session -t 0 2>/dev/null
if [ $? != 0 ]; then
echo "No active tmux session 0, starting a new one"
tmux new-session -d -s 0
else
echo "Tmux session 0 exists, stopping existing uvicorn process"
tmux send-keys -t 0 C-c # Stop the current running process
sleep 5 # Allow time for the process to stop
fi
tmux send-keys -t 0 "uvicorn main:app --host 127.0.0.1 --port 8000" C-m
EOF

EOF
6 changes: 3 additions & 3 deletions .github/workflows/aws-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
run: |
ssh -o StrictHostKeyChecking=no -i /tmp/UIUC.pem [email protected] << 'EOF'
cd ~/research-town/
git stash
git pull --no-rebase origin main
git fetch origin
git reset --hard origin/main
sed -i 's|http://localhost:8000|https://demo.auto-research.dev|g' ./frontend/src/pages/Home.jsx

cd ./frontend/
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
Expand Down
Loading