From 4352abc6a4a16257a72aae4d7c3a29aa46c9a94e Mon Sep 17 00:00:00 2001 From: Marcus Ahlfors Date: Sun, 17 Mar 2024 17:05:40 +0200 Subject: [PATCH] Remove demo sync --- .github/workflows/DemoSync.yaml | 38 --------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 .github/workflows/DemoSync.yaml diff --git a/.github/workflows/DemoSync.yaml b/.github/workflows/DemoSync.yaml deleted file mode 100644 index e6e9e3b..0000000 --- a/.github/workflows/DemoSync.yaml +++ /dev/null @@ -1,38 +0,0 @@ -name: DemoSync - -on: - push: - tags: - - '*' - -env: - TARGET_REPOSITORY: 'https://x-access-token:${{ secrets.DEMO_REPOSITORY_PAT }}@github.com/diploi/nextjs-postgresql-template-demo.git' - TAG_NAME: '${GITHUB_REF#refs/tags/}' - -jobs: - sync-folder: - runs-on: ubuntu-latest - steps: - - name: Checkout source repository - uses: actions/checkout@v2 - - - name: Sync initialProject folder and push tag - run: | - # Configure git - git config --global user.email "demo-sync@diploi.com" - git config --global user.name "Demo Sync" - - # Clone the target repository using HTTPS and PAT for authentication - git clone ${{ env.TARGET_REPOSITORY }} temp_repo - cd temp_repo - - # Sync the folder - rsync -av --delete --exclude='.git/' ../initialProject/ ./ - - # Commit and push the changes, if there are any - git add . - git diff --quiet && git diff --staged --quiet || (git commit -m "Commit sync" && git push origin main) - - # Tag and push the tag - git tag ${{ env.TAG_NAME }} - git push origin --tags