Skip to content

Commit

Permalink
Updated worflow and poetry version
Browse files Browse the repository at this point in the history
  • Loading branch information
ezhil56x committed Apr 3, 2024
1 parent 7ef13c3 commit 27ca789
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 37 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Calculate short hash
run: |
shortHash=$(git rev-parse --short ${{ github.sha }})
echo "COMMIT_SHORT_SHA=$shortHash" >> $GITHUB_ENV

- name: SSH setup and run commands
uses: appleboy/[email protected]
with:
Expand All @@ -26,7 +21,6 @@ jobs:
script: |
cd ./deploy/${{ github.event.repository.name }}
git pull
docker rm --force ${{ github.event.repository.name }}-deploy 2> /dev/null
docker build -t ${{ github.repository }}:${{ env.COMMIT_SHORT_SHA }} --quiet .
docker run --detach --publish 5000:5000 --name ${{ github.event.repository.name }}-deploy ${{ github.repository }}:${{ env.COMMIT_SHORT_SHA }}
docker container prune --force && docker image prune --all --force
docker rm -f ${{ github.event.repository.name }} || true
docker build -t ${{ github.repository }} .
docker run -d -p 5000:5000 --name ${{ github.event.repository.name }} ${{ github.repository }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM python:3.12-slim AS requirements-image

ENV PYTHONUNBUFFERED=1

RUN ["pip","install","poetry>=1.7,<1.8"]
RUN ["pip","install","poetry>=1.8,<1.9"]

RUN ["poetry","self","add","poetry-plugin-export"]

Expand Down
26 changes: 0 additions & 26 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,31 +124,5 @@ def leaderboard():
]
return render_template("leaderboard.html", all_acts=all_acts, enumerate=enumerate)


@app.route("/hall_of_cyscom")
def hall_of_cyscom():
# static/data/test_data.json
filename = join(app.static_folder, "data", "test.json")
# print(filename)

with open(filename) as test_file:
data = json.load(test_file)

return render_template("hall_of_cyscom.html", data=data)


jsonfile = open("hoomans.json", "r")
jsondata = jsonfile.read()

# Parse JSON
obj = json.loads(jsondata)
members = obj["members"]


@app.route("/legacy")
def home():
return render_template("legacy.html", context=members)


if __name__ == "__main__":
app.run(port=5000, debug=True)

0 comments on commit 27ca789

Please sign in to comment.