Skip to content

Commit a91c706

Browse files
committed
Update workflow and poetry version
1 parent e036310 commit a91c706

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

.github/workflows/deployment.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@ jobs:
1010
steps:
1111
- name: Checkout repo
1212
uses: actions/checkout@v4
13-
with:
14-
fetch-depth: 1
15-
- name: Calculate short hash
16-
run: |
17-
shortHash=$(git rev-parse --short ${{ github.sha }})
18-
echo "COMMIT_SHORT_SHA=$shortHash" >> $GITHUB_ENV
13+
1914
- name: SSH setup and run commands
2015
uses: appleboy/ssh-action@v1.0.3
2116
with:
@@ -26,7 +21,6 @@ jobs:
2621
script: |
2722
cd ./deploy/${{ github.event.repository.name }}
2823
git pull
29-
docker rm --force ${{ github.event.repository.name }}-deploy 2> /dev/null
30-
docker build -t ${{ github.repository }}:${{ env.COMMIT_SHORT_SHA }} --quiet .
31-
docker run --detach --name ${{ github.event.repository.name }}-deploy ${{ github.repository }}:${{ env.COMMIT_SHORT_SHA }}
32-
docker container prune --force && docker image prune --all --force
24+
docker rm -f ${{ github.event.repository.name }} || true
25+
docker build -t ${{ github.repository }} .
26+
docker run -d --name ${{ github.event.repository.name }} --restart always ${{ github.repository }}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM python:3.11-slim AS requirements-image
22

33
ENV PYTHONUNBUFFERED=1
44

5-
RUN ["pip","install","poetry>=1.7,<1.8"]
5+
RUN ["pip","install","poetry>=1.8,<1.9"]
66

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

0 commit comments

Comments
 (0)