diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 86c8375..6c3904e 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -44,6 +44,8 @@ jobs: - run: npm test --if-present security: + # Only run if the repository is the org repo + if: github.repository == 'Gym-Bros-Programs/banana-math' needs: [build] runs-on: ubuntu-latest steps: diff --git a/.github/workflows/sync-deployment.yml b/.github/workflows/sync-deployment.yml index 1105d67..278ddf4 100644 --- a/.github/workflows/sync-deployment.yml +++ b/.github/workflows/sync-deployment.yml @@ -7,13 +7,14 @@ on: jobs: sync: + # Only run if the repository is the org repo + if: github.repository == 'Gym-Bros-Programs/banana-math' runs-on: ubuntu-latest steps: - name: Checkout source code uses: actions/checkout@v4 with: fetch-depth: 0 - # Use PAT instead of GITHUB_TOKEN for checkout token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - name: Configure Git @@ -25,6 +26,5 @@ jobs: env: PERSONAL_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} run: | - # Use HTTPS URL with embedded token git remote add destination "https://${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/Micsushi/banana-math-deployment.git" - git push destination main:main --force \ No newline at end of file + git push destination main:main --force