Sync Site Data #27
This file contains hidden or 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 Site Data | |
| on: | |
| schedule: | |
| - cron: '10 */4 * * *' # every hour, ensure all data actions have completed | |
| workflow_dispatch: # alows manual runs | |
| jobs: | |
| update-site: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout portfolio repo | |
| uses: actions/checkout@v4 | |
| - name: Checkout internal private repo (same org) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: RobinVH/GarminData | |
| token: ${{ secrets.MY_PAT }} | |
| path: garmin-temp | |
| - name: Copy output to site folder | |
| run: | | |
| mkdir -p GarminData | |
| cp -r garmin-temp/GarminData/output/* GarminData/ | |
| - name: Commit and push changes | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "[email protected]" | |
| git add GarminData | |
| git commit -m "Update Garmin data $(date)" || echo "No changes" | |
| git push |