From c0c55c73268e091c425d10928afc6a653429199e Mon Sep 17 00:00:00 2001 From: vickytechkey Date: Sun, 6 Sep 2026 20:40:14 +0530 Subject: [PATCH] refactor: replace automated CI backup workflow with manual installation and sync scripts --- .forgejo/workflows/backup-to-s3.yml | 20 -------------------- installation.sh | 4 ++++ syncscript.sh | 1 + 3 files changed, 5 insertions(+), 20 deletions(-) delete mode 100644 .forgejo/workflows/backup-to-s3.yml create mode 100644 installation.sh create mode 100644 syncscript.sh diff --git a/.forgejo/workflows/backup-to-s3.yml b/.forgejo/workflows/backup-to-s3.yml deleted file mode 100644 index 665ce68..0000000 --- a/.forgejo/workflows/backup-to-s3.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Scheduled S3 Code Backup -on: - schedule: - # This cron expression means "At minute 0 past every 3rd hour" - - cron: '0 */3 * * *' - # It's also helpful to include workflow_dispatch so you can trigger it manually if needed - workflow_dispatch: -jobs: - backup-code: - runs-on: ubuntu-latest - container: node:22 - steps: - - name: Checkout Code - uses: actions/checkout@v3 - - name: Install AWS CLI - run: | - apt-get update && apt-get install -y awscli - - name: Sync entire repository to S3 Backup Bucket - run: | - aws s3 sync . s3://forgeocodespace --delete diff --git a/installation.sh b/installation.sh new file mode 100644 index 0000000..5b8561f --- /dev/null +++ b/installation.sh @@ -0,0 +1,4 @@ +curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip" +sudo apt install -y unzip +unzip -o awscliv2.zip +sudo ./aws/install --update \ No newline at end of file diff --git a/syncscript.sh b/syncscript.sh new file mode 100644 index 0000000..68c64a3 --- /dev/null +++ b/syncscript.sh @@ -0,0 +1 @@ +sudo aws s3 sync /var/lib/docker/volumes/forgeo_forgejo-data/_data/git/repositories/vignesh s3://forgeocodespace --delete --region ap-south-2 \ No newline at end of file