name: Build-Push-Deploy-Prod

# on:
#   push:
#     branches: [ "main" ]
#   pull_request:
#     branches: [ "main" ]

# on:
#   workflow_dispatch:

on:
  push:
    branches: [ "gitea-dev" ]
    # Publish semver tags as releases.
    # what?
    tags: [ 'v*' ]
  pull_request:
    branches: [ "gitea-dev" ]
    types: [closed]
    

jobs:
  mirror:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - name: Push to Gitea
        run: |
          git remote add gitea https://${{ secrets.GITEA_TOKEN }}@gitea.marktaguiad.dev/mcbtaguiad/marktaguiad.dev.git
          git push gitea --all
          git push gitea --tags