File tree Expand file tree Collapse file tree 2 files changed +5
-11
lines changed
Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change 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 :
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 }}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ FROM python:3.11-slim AS requirements-image
22
33ENV PYTHONUNBUFFERED=1
44
5- RUN ["pip" ,"install" ,"poetry>=1.7 ,<1.8 " ]
5+ RUN ["pip" ,"install" ,"poetry>=1.8 ,<1.9 " ]
66
77RUN ["poetry" ,"self" ,"add" ,"poetry-plugin-export" ]
88
You can’t perform that action at this time.
0 commit comments