diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index a2d1750..d89986e 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -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/ssh-action@v1.0.3 with: @@ -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 }} diff --git a/Dockerfile b/Dockerfile index c493318..242808a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"] diff --git a/app.py b/app.py index 0d09ac0..bae9794 100644 --- a/app.py +++ b/app.py @@ -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)