Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Sweetdevil144 committed Sep 23, 2023
1 parent a0d8f42 commit 8db397b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run Project with Secret
name: Youtube Shorts Project

on:
push:
Expand Down Expand Up @@ -33,10 +33,13 @@ jobs:
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

# Step 4: Execute the project script
- name: Run app.py
# Step 4: Test Flask app
- name: Test Flask app
run: |
cd $GITHUB_WORKSPACE/api
python app.py
cd $GITHUB_WORKSPACE/api
python app.py & # Start Flask in the background
sleep 10 # Give Flask some time to start
curl http://127.0.0.1:5000 # Send a request to the Flask app
kill %1 # Kill the backgrounded Flask process
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

0 comments on commit 8db397b

Please sign in to comment.