From 1b6aa3eb19030b2c6f1b3278da87f325ac947c00 Mon Sep 17 00:00:00 2001 From: Lawrence Liu Date: Sun, 31 Dec 2023 23:34:34 -0600 Subject: [PATCH] Stop strava workflow as 2023 has ended --- .github/workflows/fetch_strava.yml | 98 +++++++++++++++--------------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/.github/workflows/fetch_strava.yml b/.github/workflows/fetch_strava.yml index b03aced..ad05e16 100644 --- a/.github/workflows/fetch_strava.yml +++ b/.github/workflows/fetch_strava.yml @@ -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 }}}"} }' \ No newline at end of file +# 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 }}}"} }'