From 6f8fd02c556e2acfda7541034f0d8348302c3670 Mon Sep 17 00:00:00 2001 From: Rehan Fazal Date: Fri, 30 Aug 2024 18:28:23 +0200 Subject: [PATCH] Fixed the issue with Dropbox Upload which was happening because the token expires, added the refreh token logic --- .github/workflows/reddit_scraper.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reddit_scraper.yml b/.github/workflows/reddit_scraper.yml index 7badf65..048ea47 100644 --- a/.github/workflows/reddit_scraper.yml +++ b/.github/workflows/reddit_scraper.yml @@ -25,7 +25,9 @@ jobs: - name: Download existing Reddit data from Dropbox env: - DROPBOX_TOKEN: ${{ secrets.DROPBOX_TOKEN }} + DROPBOX_REFRESH_TOKEN: ${{ secrets.DROPBOX_REFRESH_TOKEN }} + DROPBOX_APP_KEY: ${{ secrets.DROPBOX_APP_KEY }} + DROPBOX_APP_SECRET: ${{ secrets.DROPBOX_APP_SECRET }} run: | python dropbox_utils.py --download # Add a command-line option to control what the script does @@ -40,6 +42,8 @@ jobs: - name: Upload updated Reddit data to Dropbox env: - DROPBOX_TOKEN: ${{ secrets.DROPBOX_TOKEN }} + DROPBOX_REFRESH_TOKEN: ${{ secrets.DROPBOX_REFRESH_TOKEN }} + DROPBOX_APP_KEY: ${{ secrets.DROPBOX_APP_KEY }} + DROPBOX_APP_SECRET: ${{ secrets.DROPBOX_APP_SECRET }} run: | python dropbox_utils.py --upload # Another command-line option for the upload process \ No newline at end of file