Skip to content

feat(env): update input api for env (#761) #56

feat(env): update input api for env (#761)

feat(env): update input api for env (#761) #56

Workflow file for this run

name: deploy to aws ec2 frontend
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
- name: set up SSH
run: |
echo "${{ secrets.EC2_SSH_KEY }}" > /tmp/UIUC.pem
chmod 600 /tmp/UIUC.pem
eval "$(ssh-agent -s)"
ssh-add /tmp/UIUC.pem
- name: deploy to EC2
run: |
ssh -o StrictHostKeyChecking=no -i /tmp/UIUC.pem [email protected] << 'EOF'
cd ~/research-town/
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"
nvm use 22
npm --version || { echo "npm not found after nvm use"; exit 1; }
npm install
npm run build
EOF