diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89a489e..700c7b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,8 +51,8 @@ jobs: needs: - lint - test - if: github.ref == 'refs/heads/bugfix/backload_ga4_api_data' - uses: 18F/analytics-reporter/.github/workflows/deploy.yml@bugfix/backload_ga4_api_data + if: github.ref == 'refs/heads/develop' + uses: 18F/analytics-reporter/.github/workflows/deploy.yml@develop with: ANALYTICS_GA4_CALL_RETRY_COUNT: ${{ vars.ANALYTICS_GA4_CALL_RETRY_COUNT_DEV }} ANALYTICS_KEY_FILE_NAME: ${{ vars.ANALYTICS_KEY_FILE_NAME }} diff --git a/deploy/backload.js b/deploy/backload.js index 67b7341..6f3aa3d 100755 --- a/deploy/backload.js +++ b/deploy/backload.js @@ -70,9 +70,10 @@ const api_run = () => { const iterationTargetDate = subDays(new Date(), totalDaysAgo); const iterationDaysAgo = differenceInDays(today, iterationTargetDate) + 1; - const modifiedApiJsonString = JSON.stringify(apiReports) - .replaceAll('"yesterday"', `"${iterationDaysAgo}daysAgo"`) - .replaceAll('"3daysAgo"', `"${iterationDaysAgo}daysAgo"`); + const modifiedApiJsonString = JSON.stringify(apiReports).replaceAll( + '"yesterday"', + `"${iterationDaysAgo}daysAgo"`, + ); fs.unlinkSync("reports/api.json"); fs.writeFileSync("reports/api.original.json", JSON.stringify(apiReports)); diff --git a/reports/api.json b/reports/api.json index 91f5493..c72a5db 100644 --- a/reports/api.json +++ b/reports/api.json @@ -19,7 +19,7 @@ ], "dateRanges": [ { - "startDate": "3daysAgo", + "startDate": "yesterday", "endDate": "yesterday" } ], @@ -67,7 +67,7 @@ ], "dateRanges": [ { - "startDate": "3daysAgo", + "startDate": "yesterday", "endDate": "yesterday" } ], @@ -115,7 +115,7 @@ ], "dateRanges": [ { - "startDate": "3daysAgo", + "startDate": "yesterday", "endDate": "yesterday" } ], @@ -163,7 +163,7 @@ ], "dateRanges": [ { - "startDate": "3daysAgo", + "startDate": "yesterday", "endDate": "yesterday" } ], @@ -211,7 +211,7 @@ ], "dateRanges": [ { - "startDate": "3daysAgo", + "startDate": "yesterday", "endDate": "yesterday" } ], @@ -267,7 +267,7 @@ ], "dateRanges": [ { - "startDate": "3daysAgo", + "startDate": "yesterday", "endDate": "yesterday" } ], @@ -318,7 +318,7 @@ ], "dateRanges": [ { - "startDate": "3daysAgo", + "startDate": "yesterday", "endDate": "yesterday" } ], @@ -369,7 +369,7 @@ ], "dateRanges": [ { - "startDate": "3daysAgo", + "startDate": "yesterday", "endDate": "yesterday" } ], @@ -425,7 +425,7 @@ ], "dateRanges": [ { - "startDate": "3daysAgo", + "startDate": "yesterday", "endDate": "yesterday" } ], @@ -476,7 +476,7 @@ ], "dateRanges": [ { - "startDate": "3daysAgo", + "startDate": "yesterday", "endDate": "yesterday" } ], @@ -524,7 +524,7 @@ ], "dateRanges": [ { - "startDate": "3daysAgo", + "startDate": "yesterday", "endDate": "yesterday" } ], @@ -582,7 +582,7 @@ ], "dateRanges": [ { - "startDate": "3daysAgo", + "startDate": "yesterday", "endDate": "yesterday" } ], @@ -639,7 +639,7 @@ ], "dateRanges": [ { - "startDate": "3daysAgo", + "startDate": "yesterday", "endDate": "yesterday" } ],