Compare commits

..

10 commits

Author SHA1 Message Date
pb-coding
32e4210584 testing deploy workflow
Some checks failed
Build and push docker image and deploy / build_and_push (push) Failing after 8s
Build and push docker image and deploy / deploy (push) Has been skipped
2023-10-23 22:38:24 +02:00
Philipp Beckmann
4a5baeb742
Update deploy.sh 2023-10-23 22:20:15 +02:00
Philipp Beckmann
6277be8c01
Update deploy.yml 2023-10-23 22:08:06 +02:00
Philipp Beckmann
1f3d045f93
Update deploy.sh 2023-10-23 22:04:27 +02:00
Philipp Beckmann
75adbefaa4
Update deploy.yml 2023-10-23 21:53:53 +02:00
Philipp Beckmann
fab568ef88
Update deploy.yml 2023-10-23 21:35:04 +02:00
Philipp Beckmann
ced0228c8c
testing deploy workflow 2023-10-23 21:19:47 +02:00
Philipp Beckmann
1d8cc85fc6
Update deploy.yml 2023-10-20 17:09:00 +02:00
Philipp Beckmann
2259b7e8a1
Update deploy.yml 2023-10-20 16:50:15 +02:00
Philipp Beckmann
5346c558aa
Update deploy.yml 2023-10-20 16:42:03 +02:00
3 changed files with 16 additions and 16 deletions

View file

@ -8,15 +8,17 @@ 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 $GITHUB_TOKEN $DOCKER_REGISTRY
docker login -u $DOCKER_USERNAME --password $DOCKER_REGISTRY_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
@ -34,4 +36,4 @@ docker run -d \
-v $TARGET_DIRECTORY:/app \
$DOCKER_REGISTRY/$DOCKER_USERNAME/$DOCKER_IMAGE_NAME:latest
echo "Deployment complete."
echo "Deployment complete."

View file

@ -33,17 +33,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: astappiev/docker-compose-remote-action@master
name: Docker-Compose Remote Deployment
- uses: appleboy/ssh-action@v1.0.0
name: Fetch and run deploy script on remote
with:
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 }}
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

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>