name: Manual Deploy # Re-deploy a previously released tag. The tag prefix selects which part: # client-v* -> deploy-client.sh (web app + installers + version.yaml) # site-v* -> deploy-site.sh (marketing site) # server-v* -> deploy-server.sh (backend binary + nginx) # Each deploy script downloads its assets from the matching Forgejo Release. on: workflow_dispatch: inputs: version: description: 'Prefixed tag to deploy (e.g. client-v1.0.55 / site-v1.0.0 / server-v1.0.0)' required: true type: string jobs: deploy: runs-on: mac steps: - uses: actions/checkout@v4 with: ref: ${{ inputs.version }} - name: Deploy (routed by tag prefix) env: FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }} FORGEJO_URL: ${{ secrets.FORGEJO_URL }} GITEA_REPOSITORY: ${{ gitea.repository }} EC2_SSH_KEY: ${{ secrets.EC2_SSH_KEY }} EC2_HOST: ${{ secrets.EC2_HOST }} EC2_USER: ${{ secrets.EC2_USER }} run: | TAG="${{ inputs.version }}" case "$TAG" in client-v*) sh scripts/ci/deploy-client.sh "$TAG" ;; site-v*) sh scripts/ci/deploy-site.sh "$TAG" ;; server-v*) sh scripts/ci/deploy-server.sh "$TAG" ;; *) echo "Unknown tag prefix: $TAG (expected client-v* / site-v* / server-v*)" >&2; exit 1 ;; esac - name: Notify if: always() env: TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }} TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} run: sh scripts/ci/notify.sh "${{ inputs.version }}" "${{ job.status }}"