Skip to content

Update Heatmap

Update Heatmap #10

name: Update Heatmap
on:
schedule: # Run workflow automatically
- cron: '0 0 * * *' # Runs once a day
workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the GitHub Actions Workflow page directly
permissions:
contents: write # To write the generated contents to the readme
jobs:
update-strava-heatmap:
runs-on: ubuntu-latest
env:
STRAVA_CLIENT_ID: ${{ secrets.STRAVA_CLIENT_ID }}
STRAVA_CLIENT_SECRET: ${{ secrets.STRAVA_CLIENT_SECRET }}
STRAVA_REFRESH_TOKEN: ${{ secrets.STRAVA_REFRESH_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: main
- name: Checkout
uses: actions/checkout@v4
with:
repository: leesamuel423/StravaGraph
path: strava
ref: 35b8194a6c52c75e651c1fcc07c820e308733c78
- name: Generate heatmap
run: |
cd strava
go build -o strava-heatmap ./cmd/strava-heatmap
./strava-heatmap -generate > ../main/strava-heatmap.svg
- name: Commit and push _posts folder
run: |
cd main
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add strava-heatmap.svg
git commit -m 'doc: Updated Strava heatmap'
git push origin HEAD