Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CD added #7

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gcloudignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.venv/
25 changes: 25 additions & 0 deletions .github/workflows/.app-engine-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# .app-engine-cd.yml

name: Basic CD
on:
push:
branches: [master, main]

jobs:
deploy-to-app-engine:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
# Authenticate via Service Account Key JSON
# See https://github.com/google-github-actions/auth#authenticating-via-service-account-key-json-1
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'

# Use Google official GHA to deploy 🎉
- id: 'deploy'
uses: 'google-github-actions/deploy-appengine@v1'
5 changes: 5 additions & 0 deletions app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
runtime: python39 # Define the python version pre-installed on the machine
service: default # Give a name to your app. ❗️ First deployment must be called "default"
handlers: # Define how to handle incoming requests. Here, any request will be handled by main.py
- url: /.*
script: main.py
6 changes: 6 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from wsgi import app

if __name__ == '__main__':
# This is used when running locally only. When deploying to Google App
# Engine, a webserver process such as Gunicorn will serve the app
app.run(host='127.0.0.1', port=8080, debug=True)
29 changes: 29 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
astroid==3.2.4 ; python_version >= "3.8" and python_version < "4.0"
blinker==1.8.2 ; python_version >= "3.8" and python_version < "4.0"
certifi==2024.8.30 ; python_version >= "3.8" and python_version < "4.0"
charset-normalizer==3.4.0 ; python_version >= "3.8" and python_version < "4.0"
click==8.1.7 ; python_version >= "3.8" and python_version < "4.0"
colorama==0.4.6 ; python_version >= "3.8" and python_version < "4.0" and (sys_platform == "win32" or platform_system == "Windows")
dill==0.3.9 ; python_version >= "3.8" and python_version < "4.0"
exceptiongroup==1.2.2 ; python_version >= "3.8" and python_version < "3.11"
flask==3.0.3 ; python_version >= "3.8" and python_version < "4.0"
idna==3.10 ; python_version >= "3.8" and python_version < "4.0"
importlib-metadata==8.5.0 ; python_version >= "3.8" and python_version < "3.10"
iniconfig==2.0.0 ; python_version >= "3.8" and python_version < "4.0"
isort==5.13.2 ; python_version >= "3.8" and python_version < "4.0"
itsdangerous==2.2.0 ; python_version >= "3.8" and python_version < "4.0"
jinja2==3.1.4 ; python_version >= "3.8" and python_version < "4.0"
markupsafe==2.1.5 ; python_version >= "3.8" and python_version < "4.0"
mccabe==0.7.0 ; python_version >= "3.8" and python_version < "4.0"
packaging==24.1 ; python_version >= "3.8" and python_version < "4.0"
platformdirs==4.3.6 ; python_version >= "3.8" and python_version < "4.0"
pluggy==1.5.0 ; python_version >= "3.8" and python_version < "4.0"
pylint==3.2.7 ; python_version >= "3.8" and python_version < "4.0"
pytest==8.3.3 ; python_version >= "3.8" and python_version < "4.0"
requests==2.32.3 ; python_version >= "3.8" and python_version < "4.0"
tomli==2.0.2 ; python_version >= "3.8" and python_version < "3.11"
tomlkit==0.13.2 ; python_version >= "3.8" and python_version < "4.0"
typing-extensions==4.12.2 ; python_version >= "3.8" and python_version < "3.11"
urllib3==2.2.3 ; python_version >= "3.8" and python_version < "4.0"
werkzeug==3.0.4 ; python_version >= "3.8" and python_version < "4.0"
zipp==3.20.2 ; python_version >= "3.8" and python_version < "3.10"
1 change: 1 addition & 0 deletions static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ body {
text-align: center;
background-color: #FFEB3B;
color: #666;

}
#form, #results {
margin: 1em 0;
Expand Down
Loading