File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 branches :
66 - main
77
8+ env :
9+ DEPLOY_PATH : /home/${{ secrets.USERNAME }}/projects/link-manager-api
10+
811jobs :
912 build_and_push :
1013 runs-on : ubuntu-latest
@@ -24,24 +27,23 @@ jobs:
2427 docker push axlz/link-manager-api
2528
2629 - name : Send compose.yml to VPS
27- uses : appleboy/scp-action@master
30+ uses : appleboy/scp-action@v1
2831 with :
2932 host : ${{ secrets.HOST }}
3033 username : ${{ secrets.USERNAME }}
3134 password : ${{ secrets.PASSWORD }}
3235 port : ${{ secrets.PORT }}
3336 source : " compose.yml"
34- target : " /home/ ${{ secrets.USERNAME }}/link-manager-api "
37+ target : ${{ env.DEPLOY_PATH }}
3538
3639 - name : Deploy to VPS
37- uses : appleboy/ssh-action@master
40+ uses : appleboy/ssh-action@v1
3841 with :
3942 host : ${{ secrets.HOST }}
4043 username : ${{ secrets.USERNAME }}
4144 password : ${{ secrets.PASSWORD }}
4245 port : ${{ secrets.PORT }}
4346 script : |
44- docker pull axlz/link-manager-api
45- cd link-manager-api
47+ cd $DEPLOY_PATH
4648 echo "${{ secrets.ENV_FILE }}" > .env
47- docker compose up -d --build --force-recreate
49+ docker compose up -d --pull always --force-recreate
You can’t perform that action at this time.
0 commit comments