Skip to content

Commit e80ef90

Browse files
Merge pull request #1 from hyperloop-cornell/feat/frontend-improvements-1
feat: frontend animation addition, collsable side panel
2 parents 7107374 + 444b716 commit e80ef90

4 files changed

Lines changed: 26 additions & 19 deletions

File tree

.github/workflows/test-and-deploy.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
jobs:
99
test-api:
10+
if: github.event.action != 'closed'
1011
runs-on: ubuntu-latest
1112
name: Test Cloud Services API
1213

@@ -32,6 +33,7 @@ jobs:
3233
pytest tests/ -v --tb=short
3334
3435
test-web:
36+
if: github.event.action != 'closed'
3537
runs-on: ubuntu-latest
3638
name: Test Web Client
3739

@@ -77,28 +79,26 @@ jobs:
7779
- name: Configure SSH
7880
run: |
7981
mkdir -p ~/.ssh
80-
echo "${{ secrets.EC2_PEM_KEY }}" > ~/.ssh/CUloop.pem
81-
chmod 600 ~/.ssh/CUloop.pem
82-
printf "Host ec2\n HostName ${{ secrets.EC2_HOST }}\n User ${{ secrets.EC2_USER }}\n IdentityFile ~/.ssh/CUloop.pem\n StrictHostKeyChecking no\n" >> ~/.ssh/config
82+
echo "${{ secrets.EC2_PEM_KEY }}" > ~/.ssh/CULoop.pem
83+
chmod 600 ~/.ssh/CULoop.pem
84+
printf "Host ec2\n HostName ${{ secrets.EC2_HOST }}\n User ${{ secrets.EC2_USER }}\n IdentityFile ~/.ssh/CULoop.pem\n StrictHostKeyChecking no\n" >> ~/.ssh/config
8385
8486
- name: Deploy to EC2
8587
run: |
8688
ssh ec2 << 'EOF'
87-
cd /home/ubuntu/electrical-gui
88-
git pull origin main
89-
90-
# Deploy API
91-
cd cloud-services
92-
python -m pip install --upgrade pip
93-
pip install -r requirements.txt
94-
pm2 restart cloud-api || pm2 start "uvicorn src.main:app --host 0.0.0.0 --port 8080" --name cloud-api
89+
cd ~
9590
96-
# Deploy Web Client
97-
cd ../web-client
91+
# Update web client
92+
cd web-client
93+
git pull origin main
9894
npm ci
9995
npm run build
100-
pm2 restart web-client || pm2 start "npm run preview" --name web-client
96+
sudo systemctl restart frontend
10197
102-
# Save PM2 configuration
103-
pm2 save
104-
EOF
98+
# Update API
99+
cd ../cloud-services
100+
git pull origin main
101+
python -m pip install --upgrade pip
102+
pip install -r requirements.txt
103+
sudo systemctl restart backend
104+
EOF

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"python.testing.pytestArgs": [
3+
"web-client"
4+
],
5+
"python.testing.unittestEnabled": false,
6+
"python.testing.pytestEnabled": true
7+
}

cloud-services

web-client

0 commit comments

Comments
 (0)