Skip to content

Commit

Permalink
Sync to deployment (#83)
Browse files Browse the repository at this point in the history
* fixing the sync

* Fix workflow to not run on dev branch
  • Loading branch information
Micsushi authored Nov 4, 2024
1 parent aabf37b commit 8ac7462
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sync-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
git push destination main:main --force

0 comments on commit 8ac7462

Please sign in to comment.