name: Deploy documentation

on:
  workflow_dispatch:
  push:
      branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Repository
        uses: actions/checkout@v4

      - name: Login to Docker Hub
        uses: docker/login-action@v1
        with:
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_PASSWORD }}

      - name: Build Docker Image
        run: docker build -t oliverschlueter/fancyinnovations-docs:latest docs/

      - name: Publish Docker Image
        run: docker push oliverschlueter/fancyinnovations-docs:latest
