test ci cd error
This commit is contained in:
@@ -41,14 +41,40 @@ jobs:
|
||||
username: ${{ secrets.SSH_USER }}
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
script: |
|
||||
cd /root/hshop/
|
||||
cd /root/hshop/ || { echo "ERROR: دایرکتوری پیدا نشد"; exit 1; }
|
||||
|
||||
docker compose down --remove-orphans --timeout 60
|
||||
|
||||
docker compose up --build --detach --parallel
|
||||
docker compose down --remove-orphans --timeout 10
|
||||
|
||||
docker compose up --build --detach || { echo "ERROR: ارور در بیلد"; exit 1; }
|
||||
|
||||
- name: display active containers
|
||||
uses: appleboy/ssh-action@v0.1.6
|
||||
with:
|
||||
host: ${{ secrets.SERVER_HOST }}
|
||||
username: ${{ secrets.SSH_USER }}
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
script: |
|
||||
|
||||
docker compose ps
|
||||
|
||||
docker image prune -af
|
||||
- name: clean up server
|
||||
uses: appleboy/ssh-action@v0.1.6
|
||||
with:
|
||||
host: ${{ secrets.SERVER_HOST }}
|
||||
username: ${{ secrets.SSH_USER }}
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
script: |
|
||||
|
||||
docker builder prune -af
|
||||
docker image prune -af --filter "until=48h" || { echo "ERROR: ارور در پاک کردن images";}
|
||||
|
||||
docker builder prune -af --filter "until=48h" || { echo "ERROR: ارور در پاک کردن builder cache";}
|
||||
|
||||
|
||||
- name: error test
|
||||
uses: appleboy/ssh-action@v0.1.6
|
||||
with:
|
||||
host: ${{ secrets.SERVER_HOST }}
|
||||
username: ${{ secrets.SSH_USER }}
|
||||
password: ${{ secrets.SSH_PASSWORD }}
|
||||
script: |
|
||||
cd /root/asdfasdfasdfasdf/ || { echo "ERROR: دایرکتوری پیدا نشد"; exit 1; }
|
||||
Reference in New Issue
Block a user