chore: README, LICENSE, .gitignore - Prime-AI #2
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: 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" |