Skip to content

Sync Site Data

Sync Site Data #1157

Workflow file for this run

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 garminData
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: Checkout SpotifyAuto
uses: actions/checkout@v4
with:
repository: RobinVH/SpotifyAuto
token: ${{ secrets.MY_PAT }}
path: spotify-temp
- name: Copy output to site folder
run: |
mkdir -p SpotifyAuto
cp -r spotify-temp/output/* SpotifyAuto/
- name: Commit and push changes
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
git add GarminData
git add SpotifyAuto
git commit -m "Update all data $(date)" || echo "No changes"
git push