mirror of
https://github.com/BeardedTek/flowbite-beardedtek.com.git
synced 2025-12-06 05:31:52 +00:00
remove DC_BUILD_FLAGS and DC_UP_FLAGS
Turn docker compose command into a variable and echo it prior to SSH'ing into server.
This commit is contained in:
6
.github/workflows/deploy.yml
vendored
6
.github/workflows/deploy.yml
vendored
@@ -18,11 +18,11 @@ jobs:
|
||||
REMOTE_HOST: ${{ secrets.REMOTE_HOST}}
|
||||
REMOTE_USER: ${{ secrets.REMOTE_USER}}
|
||||
DC_FILE: ${{ secrets.DOCKER_COMPOSE_FILE }}
|
||||
DC_BUILD_FLAGS: "--no-cache"
|
||||
DC_UP_FLAGS: "-d"
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "$DEPLOY_KEY" > ~/.ssh/id_rsa
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
ssh-keyscan -H $REMOTE_HOST >> ~/.ssh/known_hosts
|
||||
ssh -i ~/.ssh/id_rsa $REMOTE_USER@$REMOTE_HOST "docker compose -f $DC_FILE build $DC_BUILD_FLAGS && docker compose -f $DC_FILE up $DC_UP_FLAGS"
|
||||
CMD="docker compose -f $DC_FILE build --no-cache && docker compose -f $DC_FILE up -d"
|
||||
echo $CMD
|
||||
ssh -i ~/.ssh/id_rsa $REMOTE_USER@$REMOTE_HOST $CMD
|
||||
Reference in New Issue
Block a user