-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.38 KB
/
generate-stravagraph.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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