Skip to content

Commit

Permalink
Stop strava workflow as 2023 has ended
Browse files Browse the repository at this point in the history
  • Loading branch information
LwrncLiu authored Jan 1, 2024
1 parent 3fcc6dd commit 1b6aa3e
Showing 1 changed file with 49 additions and 49 deletions.
98 changes: 49 additions & 49 deletions .github/workflows/fetch_strava.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
name: Miles Retrieval

on:
workflow_dispatch:
schedule:
- cron: '0 6 * * *'

jobs:
update:
runs-on: ubuntu-latest

steps:
- name: check out repo
uses: actions/checkout@v2

- name: use node
uses: actions/setup-node@v2
with:
node-version: '18.x'

- name: install node dependencies
run: npm ci

- name: get miles
run: npm run update-ytd-distance
id: miles
env:
STRAVA_CLIENT_SECRET: ${{ secrets.STRAVA_CLIENT_SECRET }}
STRAVA_REFRESH_TOKEN: ${{ secrets.STRAVA_REFRESH_TOKEN }}

- name: update file
run: echo "$TOTAL_MILES" > ./docs/data.json
env:
TOTAL_MILES: ${{ steps.miles.outputs.TOTAL_MILES }}

- name: commit changed file
uses: EndBug/add-and-commit@v7
with:
add: './docs/data.json'
message: 'Update total miles in data.json file'

# - name: Fetch data
# uses: JamesIves/fetch-api-data-action@v2
# with:
# debug: true
# token-endpoint: https://www.strava.com/api/v3/oauth/token
# token-configuration: '{ "method":"POST", "headers": {"Accept": "application/json", "Content-Type": "application/json"}, "body": {"client_id": "99458", "client_secret": "${{ secrets.STRAVA_CLIENT_SECRET }}", "refresh_token": "${{ secrets.STRAVA_REFRESH_TOKEN }}", "grant_type": "refresh_token"} }'
# endpoint: https://www.strava.com/api/v3/athletes/49030731/stats
# configuration: '{ "method": "GET", "headers": {"Authorization": "Bearer {{{ data.access_token }}}"} }'
# name: Miles Retrieval

# on:
# workflow_dispatch:
# schedule:
# - cron: '0 6 * * *'

# jobs:
# update:
# runs-on: ubuntu-latest

# steps:
# - name: check out repo
# uses: actions/checkout@v2

# - name: use node
# uses: actions/setup-node@v2
# with:
# node-version: '18.x'

# - name: install node dependencies
# run: npm ci

# - name: get miles
# run: npm run update-ytd-distance
# id: miles
# env:
# STRAVA_CLIENT_SECRET: ${{ secrets.STRAVA_CLIENT_SECRET }}
# STRAVA_REFRESH_TOKEN: ${{ secrets.STRAVA_REFRESH_TOKEN }}

# - name: update file
# run: echo "$TOTAL_MILES" > ./docs/data.json
# env:
# TOTAL_MILES: ${{ steps.miles.outputs.TOTAL_MILES }}

# - name: commit changed file
# uses: EndBug/add-and-commit@v7
# with:
# add: './docs/data.json'
# message: 'Update total miles in data.json file'

# # - name: Fetch data
# # uses: JamesIves/fetch-api-data-action@v2
# # with:
# # debug: true
# # token-endpoint: https://www.strava.com/api/v3/oauth/token
# # token-configuration: '{ "method":"POST", "headers": {"Accept": "application/json", "Content-Type": "application/json"}, "body": {"client_id": "99458", "client_secret": "${{ secrets.STRAVA_CLIENT_SECRET }}", "refresh_token": "${{ secrets.STRAVA_REFRESH_TOKEN }}", "grant_type": "refresh_token"} }'
# # endpoint: https://www.strava.com/api/v3/athletes/49030731/stats
# # configuration: '{ "method": "GET", "headers": {"Authorization": "Bearer {{{ data.access_token }}}"} }'

0 comments on commit 1b6aa3e

Please sign in to comment.