changes
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 9s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 9s
This commit is contained in:
parent
24d8cd1344
commit
39c9b7a048
@ -13,7 +13,6 @@ jobs:
|
|||||||
Explore-Gitea-Actions:
|
Explore-Gitea-Actions:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Execute remote SSH commands using password
|
- name: Execute remote SSH commands using password
|
||||||
uses: appleboy/ssh-action@v1
|
uses: appleboy/ssh-action@v1
|
||||||
with:
|
with:
|
||||||
@ -22,5 +21,5 @@ jobs:
|
|||||||
password: ${{ secrets.PASSWORD }}
|
password: ${{ secrets.PASSWORD }}
|
||||||
port: ${{ secrets.PORT }}
|
port: ${{ secrets.PORT }}
|
||||||
script: |
|
script: |
|
||||||
cd /home/geezo/docker_containers/${{ env.app_folder }} && \
|
cd /home/geezo/docker_containers && \
|
||||||
docker compose -f docker-compose.yml down \
|
./restart_container.sh ${{ env.app_folder }} \
|
||||||
@ -1,2 +1,3 @@
|
|||||||
sdvsdvccsddddcacssdcws
|
sdvsdvccsddddcacssdcws
|
||||||
sdcsdccdwc
|
sdcsdccdwc
|
||||||
|
scwdc
|
||||||
24
restart_container.sh
Executable file
24
restart_container.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Check if a value was provided
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "Usage: $0 <value>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use the provided argument
|
||||||
|
VALUE="$1"
|
||||||
|
TARGET_DIR="/home/geezo/docker_containers/$VALUE"
|
||||||
|
|
||||||
|
# Check if the directory exists
|
||||||
|
if [ ! -d "$TARGET_DIR" ]; then
|
||||||
|
echo "Error: Directory $TARGET_DIR does not exist."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Navigate to the target directory
|
||||||
|
cd "$TARGET_DIR" || { echo "Failed to change directory to $TARGET_DIR"; exit 1; }
|
||||||
|
|
||||||
|
# Run Docker Compose commands
|
||||||
|
docker compose down
|
||||||
|
docker compose up -d
|
||||||
Loading…
Reference in New Issue
Block a user