Skip to content

Commit

Permalink
Update workflow and poetry version
Browse files Browse the repository at this point in the history
  • Loading branch information
ezhil56x committed Apr 3, 2024
1 parent e036310 commit a91c706
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 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 --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 --name ${{ github.event.repository.name }} --restart always ${{ 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.11-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

0 comments on commit a91c706

Please sign in to comment.