This repository contains the template code to generate your own Strava statistics pages. Just follow the steps below. If you experience any issues with any of the steps, feel free to open an issue. I'll be glad to help you out 💅.
Actions secrets and variables
page (https://github.com/[YOUR-GITHUB-USERNAME]/[REPOSITORY-NAME]/settings/secrets/actions)
Keep this page open, you will need to add several secrets hereclient ID
and client secret
client ID
copied from Strava API settings pageclient secret
copied from Strava API settings pageStrava API refresh token
. This might be the hardest step.
scope
in step 2 to activity:read_all
to make sure your refresh token has access to all activities
refresh token
you just obtainedWorkflow permissions
and make sure Read and write permissions
is checked
The last thing you need to do is edit the workflow files update-strava-activities.yml
, update-ftp.yml
and update-key-value-store.yml
:
#
characterScroll down to:
name: Initialize GIT
run: |
git config --global user.name 'YOUR_GITHUB_USERNAME'
git config --global user.email 'YOUR_GITHUB_USERNAME@users.noreply.github.com'
YOUR_GITHUB_USERNAME
with your own usernamecommit changes
at the top right-hand cornerBefore running the first activity import, you need to
!!! It's important you wait until a workflow is done, before running another one !!!
YYYY-MM-DD
and run the workflow
YYYY-MM-DD
) you've set the FTP on and run the workflow
commit changes
at the top right-hand cornerimport activities
workflow, all your challenges will be importedThere's also a HTML versions available with a lot more features. You can easily host this for free on https://vercel.com:
Framework preset
setting use Other
Root directory
is set to build/html
Include source files outside of the Root Directory in the Build Step.
Run workflow
at the right-hand sideApp\Infrastructure\Exception\EntityNotFound: KeyValue "athlete_birthday" not found
,
it means that you have not set your birthday. Run the "Update athlete birthday" workflowThis is because I introduced breaking changes without realising it. Yeah, I know stupid. GitHub does not allow you to automatically update workflow files from a template, so you'll have to do this manually.
Update the following files in your own repository to the latest versions:
For any feedback, help or feature requests, please open a new issue
If you want to add features or fix bugs yourself, you can do this by setting up the project on your local machine. Just clone this git repository and you should be good to go.
The project can be run in a single Docker
container which uses PHP.
There's also a Make
file to... make things easier:
# Run a docker-compose command.
make dc cmd="run"
# Run "composer" command in the php-cli container.
make dcr cmd="composer"
# Run an app console command
make console arg="app:some:command"
# Run the test suite.
make phpunit
# Run PHPStan
make phpstan
For other useful Make
commands, check Makefile
All notable changes to this project will be documented in this file.