name: Deploy Nexus Manual
run-name: Deploy Nexus manually by @${{ gitea.actor }}

concurrency:
  group: deploy-production
  cancel-in-progress: false

on:
  workflow_dispatch:

jobs:
  deploy:
    name: Deploy Nexus
    runs-on: linux
    env:
      DEPLOY_PATH: /home/projekte_bao/nexus
      ENV_POSTGRES_PASSWORD: ${{ secrets.ENV_POSTGRES_PASSWORD }}
      ENV_JWT_KEY: ${{ secrets.ENV_JWT_KEY }}
      ENV_BOOTSTRAP_OWNER_PASSWORD: ${{ secrets.ENV_BOOTSTRAP_OWNER_PASSWORD }}
      ENV_OPENCLAW_TOKEN: ${{ secrets.ENV_OPENCLAW_TOKEN }}
    steps:
      - name: Checkout main
        uses: actions/checkout@v4
        with:
          ref: main
          fetch-depth: 0

      - name: Deploy main
        run: sh .gitea/scripts/deploy-nexus.sh
