Skip to content

Commit

Permalink
github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
saumya-bansal committed Apr 18, 2022
1 parent 94b46bf commit 7e7c8b3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Secrets
run: |
cp example.app.yaml app.yaml
sed -i 's/DB_URL: ""/DB_URL: "${{ secrets.GCP_PROJECT }}"/' app.yaml
sed -i 's/DB_URL: ""/DB_URL: "${{ secrets.DB_URL }}"/' app.yaml
sed -i 's/NYT_API_KEY: ""/NYT_API_KEY: "${{ secrets.NYT_API_KEY }}"/' app.yaml
sed -i 's/GOOGLE_API_KEY: ""/GOOGLE_API_KEY: "${{ secrets.GOOGLE_API_KEY }}"/' app.yaml
Expand Down
10 changes: 6 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
from flask import Flask, request, Response
from flask_restx import Api, Resource
from flask_cors import CORS
import json
from bson import ObjectId
from datetime import datetime, timedelta

import pymongo
from bson import ObjectId
from flask import Flask, Response, request
from flask_cors import CORS
from flask_restx import Api, Resource

import mongodb

flask_app = Flask(__name__)
Expand Down
6 changes: 4 additions & 2 deletions mongodb.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import pymongo
import os
from os.path import join, dirname
from os.path import dirname, join

import pymongo
from dotenv import load_dotenv

dotenv_path = join(dirname(__file__), '.env')
load_dotenv(dotenv_path)

Expand Down

0 comments on commit 7e7c8b3

Please sign in to comment.