diff --git a/.github/workflows/sync-private-repo.yml b/.github/workflows/sync-private-repo.yml deleted file mode 100644 index 50774cc..0000000 --- a/.github/workflows/sync-private-repo.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Sync Public Repository to Private Repo - -on: - push: - branches: - - main # Trigger on commits to the 'main' branch - -jobs: - sync-to-private-repo: - runs-on: ubuntu-latest - - steps: - # Checkout the public repository - - name: Checkout Public Repository - uses: actions/checkout@v3 - - # Clone the private repository using a secret for the URL - - name: Clone Private Repository - env: - PAT: ${{ secrets.PAT_PRIVATE_REPO }} # GitHub secret for the Personal Access Token (PAT) - run: | - # Clone private repo using the PAT for authentication - git clone https://nsswifter:${PAT}@github.com/nsswifter/AcademicApplicationDocuments.git private-repo - cd private-repo - ls -la # List the contents of the private repo to confirm it was cloned - - # Copy all files from the public repo into the private repo - - name: Copy Public Repo Files to Private Repo - run: | - # Go back to the root of the public repo (where the files are located) - cd ${{ github.workspace }} # Ensure we're in the root of the public repository - cp -r ./* ./private-repo/ # Copy all files from the public repo to the private repo - - # Commit and push the changes to the private repo - - name: Commit and Push Changes to Private Repo - run: | - cd private-repo - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git add . - git commit -m "Sync updated CV and other files from public repo" || echo "No changes to commit" - git push https://nsswifter:${{ secrets.PAT_PRIVATE_REPO }}@github.com/nsswifter/AcademicApplicationDocuments.git