chore: updates deps and ci #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync Playgrounds | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'playgrounds/**' | |
- 'packages/**' | |
- .github/workflows/playgrounds.yaml | |
workflow_dispatch: | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.HEB_TOKEN }} | |
- name: Set up Git config | |
run: | | |
git config --global user.name "GitHub Actions Bot" | |
git config --global user.email "actions@github.com" | |
- name: Sync directories to child repo branches | |
run: | | |
git remote add child_repo https://${{ secrets.GITHUB_TOKEN }}:x-oauth-basic@github.com/Hebilicious/authjs-nuxt-examples.git | |
for dir in $(find playgrounds -maxdepth 1 -mindepth 1 -type d); do | |
branch_name=$(basename $dir) | |
git subtree split --prefix=$dir -b $branch_name | |
git push --force child_repo $branch_name:$branch_name | |
done | |
env: | |
GITHUB_TOKEN: ${{ secrets.HEB_TOKEN }} |