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"
TARGET_DIRECTORY="/home/pb1497/deployments/$CONTAINER_NAME"
DOCKER_NETWORK="swag_net"
DOCKER_REGISTRY_TOKEN=$1
# Authenticate 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
echo "Pulling the latest Docker image..."
docker pull $DOCKER_REGISTRY/$DOCKER_USERNAME/$DOCKER_IMAGE_NAME:latest
mkdir -p $TARGET_DIRECTORY
cd $TARGET_DIRECTORY
# Stop and remove the existing container if it exists

View file

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

View file

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