-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (50 loc) · 1.68 KB
/
deploy.yml
File metadata and controls
60 lines (50 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Deploy to GitHub Pages and Render
on:
push:
branches: [main]
workflow_dispatch:
jobs:
deploy-ui:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: ui/package-lock.json
- name: Install dependencies
run: |
cd ui
npm ci
- name: Build
run: |
cd ui
npm run build
touch out/.nojekyll
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ui/out
branch: gh-pages
deploy-api-notification:
runs-on: ubuntu-latest
needs: deploy-ui
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Notify about API deployment
run: |
echo "UI deployment complete. The API must be deployed separately to Render."
echo "Follow these steps to deploy the API:"
echo "1. Create a new Web Service on Render.com"
echo "2. Connect your GitHub repository"
echo "3. Select the 'api' directory as the root directory"
echo "4. Set the build command to 'pip install -r requirements.txt'"
echo "5. Set the start command to 'uvicorn main:app --host 0.0.0.0 --port $PORT'"
echo "6. Add the environment variable PYTHON_VERSION=3.10.0"
echo "7. Deploy the service"
echo "8. Update the PRODUCTION_API_URL in ui/app/config.ts with your Render service URL"
echo "9. Commit and push the changes to trigger a new UI deployment"