RBLNews/.github/workflows/deploy.prod-env.yml
Workflow config file is invalid. Please check your config file: yaml: line 21: did not find expected key
iTob 534af4073b
All checks were successful
Restart Docker Container on Production / build (pull_request) Successful in 4m25s
fix dockerfile
2024-09-22 15:08:05 +02:00

30 lines
1.1 KiB
YAML

name: Build, push and restart docker container on Test environment
run-name: ${{ gitea.actor }} is runs ci pipeline
on:
release:
types: [ published, edited ]
jobs:
build:
runs-on: ubuntu-latest
container: ghcr.io/catthehacker/ubuntu:act-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: git.wohlleben.dev
username: ${{ gitea.actor }}
password: ${{ vars.REGISTRY_TOKEN }}
- name: Restart all Docker Container on Production
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ vars.STRATO_VPS_HOST_ADDRESS }}
username: ${{ vars.STRATO_VPS_USER_NAME }}
key: ${{ vars.STRATO_VPS_ROOT_USER_SSH_KEY }}
script: |
docker pull git.wohlleben.dev/itob/rbl-news-webapp:latest
docker stop rbl-news-webapp
docker rm rbl-news-webapp
docker run --init -d --name rbl-news-webapp -p 8000:8080 --restart=always git.wohlleben.dev/itob/rbl-news-webapp:latest
docker system prune -af