From aa8d5dfd418dd024fbcb6ee168b79f012beda65e Mon Sep 17 00:00:00 2001 From: asepharyana Date: Sat, 1 Aug 2026 16:44:04 +0700 Subject: [PATCH] =?UTF-8?q?ci:=20GitHub=20primary=20=E2=80=94=20mirror=20k?= =?UTF-8?q?e=20Gitea=20backup;=20hapus=20workflow=20legacy=20(hobby=20repo?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 35 ------------------------------ .github/workflows/mirror-gitea.yml | 26 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 35 deletions(-) delete mode 100644 .github/workflows/deploy.yml create mode 100644 .github/workflows/mirror-gitea.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 62e557f..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Deploy to VPS - -on: - push: - branches: - - main - workflow_dispatch: - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Deploy via SSH - uses: appleboy/ssh-action@v1.0.3 - env: - ENV_FILE: ${{ secrets.ENV_FILE }} - with: - host: ${{ secrets.VPS_HOST }} - username: ${{ secrets.VPS_USERNAME }} - key: ${{ secrets.VPS_SSH_KEY }} - envs: ENV_FILE - script: | - cd /opt/imphenbot || exit - - # Pull latest changes - git pull origin main - - # Write environment variables from GitHub Secrets - echo "$ENV_FILE" > .env - - # Build and restart containers - docker-compose up -d --build diff --git a/.github/workflows/mirror-gitea.yml b/.github/workflows/mirror-gitea.yml new file mode 100644 index 0000000..b5e28fc --- /dev/null +++ b/.github/workflows/mirror-gitea.yml @@ -0,0 +1,26 @@ +name: Mirror to Gitea + +on: + push: + branches: [main, master] + workflow_dispatch: + +permissions: + contents: write + +jobs: + mirror: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v7 + with: + fetch-depth: 0 + + - name: Mirror to Gitea + env: + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + run: | + git remote add gitea "https://oauth2:${GITEA_TOKEN}@git.imrnes.team/MythEclipse/dc-recorder.git" + git push --mirror gitea + echo "✅ Mirrored to Gitea (MythEclipse/dc-recorder)"