Compare commits

..

No commits in common. "32e421058482c9cb8a4439d9af94acb21b711638" and "8c153c7823e951ea48b5fdfe6eedb368973f65a0" have entirely different histories.

3 changed files with 16 additions and 16 deletions

View file

@ -8,17 +8,15 @@ DOCKER_IMAGE_NAME="skyjo-fe"
CONTAINER_NAME="skyjo-fe" CONTAINER_NAME="skyjo-fe"
TARGET_DIRECTORY="/home/pb1497/deployments/$CONTAINER_NAME" TARGET_DIRECTORY="/home/pb1497/deployments/$CONTAINER_NAME"
DOCKER_NETWORK="swag_net" DOCKER_NETWORK="swag_net"
DOCKER_REGISTRY_TOKEN=$1
# Authenticate with Docker registry # Authenticate with Docker registry
echo "Authenticating with Docker registry..." echo "Authenticating with Docker registry..."
docker login -u $DOCKER_USERNAME --password $DOCKER_REGISTRY_TOKEN $DOCKER_REGISTRY docker login -u $DOCKER_USERNAME --password $GITHUB_TOKEN $DOCKER_REGISTRY
# Pull the latest Docker image # Pull the latest Docker image
echo "Pulling the latest Docker image..." echo "Pulling the latest Docker image..."
docker pull $DOCKER_REGISTRY/$DOCKER_USERNAME/$DOCKER_IMAGE_NAME:latest docker pull $DOCKER_REGISTRY/$DOCKER_USERNAME/$DOCKER_IMAGE_NAME:latest
mkdir -p $TARGET_DIRECTORY
cd $TARGET_DIRECTORY cd $TARGET_DIRECTORY
# Stop and remove the existing container if it exists # Stop and remove the existing container if it exists
@ -36,4 +34,4 @@ docker run -d \
-v $TARGET_DIRECTORY:/app \ -v $TARGET_DIRECTORY:/app \
$DOCKER_REGISTRY/$DOCKER_USERNAME/$DOCKER_IMAGE_NAME:latest $DOCKER_REGISTRY/$DOCKER_USERNAME/$DOCKER_IMAGE_NAME:latest
echo "Deployment complete." echo "Deployment complete."

View file

@ -33,15 +33,17 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: appleboy/ssh-action@v1.0.0 - uses: astappiev/docker-compose-remote-action@master
name: Fetch and run deploy script on remote name: Docker-Compose Remote Deployment
with: with:
host: ${{ secrets.DEPLOY_HOST }} ssh_host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }} ssh_user: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }} ssh_private_key: ${{ secrets.DEPLOY_KEY }}
port: 22 ssh_host_public_key: ${{ secrets.DEPLOY_PUBLIC_KEY }}
script: | ssh_jump_host: ${{ secrets.DEPLOY_HOST }}
curl -O https://raw.githubusercontent.com/pb-coding/skyjo-fe/main/.github/scripts/deploy.sh ssh_jump_public_key: ${{ secrets.DEPLOY_PUBLIC_KEY }}
chmod +x deploy.sh docker_compose_prefix: skyjo-fe
./deploy.sh ${{ secrets.DOCKER_REGISTRY_TOKEN }} workspace: ~/deployments/skyjo-fe
rm deploy.sh container_registry: ghcr.io
container_registry_username: ${{ github.actor }}
container_registry_password: ${{ secrets.DOCKER_REGISTRY_TOKEN }}

View file

@ -16,7 +16,7 @@
rel="stylesheet" rel="stylesheet"
/> />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Play Skylo!!</title> <title>Play Skylo!</title>
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>