diff --git a/.github/workflows/_wins-data.yml b/.github/workflows/_wins-data.yml index 7e40e1b060..8536a6a7b9 100644 --- a/.github/workflows/_wins-data.yml +++ b/.github/workflows/_wins-data.yml @@ -28,7 +28,7 @@ jobs: uses: stefanzweifel/git-auto-commit-action@v3.0.0 with: # Optional glob pattern of files which should be added to the commit - file_pattern: _data/_wins-data.json + file_pattern: _data/external/_wins-data.json commit_message: Update contributor and language data diff --git a/.github/workflows/vrms-data.yml b/.github/workflows/vrms-data.yml index c4b2ed9125..2e19a744b9 100644 --- a/.github/workflows/vrms-data.yml +++ b/.github/workflows/vrms-data.yml @@ -16,12 +16,12 @@ jobs: # Use an action (`my-action`) in your repository - name: Save vrms_data.json - run: curl -o _data/vrms_data.json https://www.vrms.io/api/recurringevents + run: curl -o _data/external/vrms_data.json https://www.vrms.io/api/recurringevents - uses: stefanzweifel/git-auto-commit-action@v3.0.0 with: # Optional glob pattern of files which should be added to the commit - file_pattern: _data/vrms_data.json + file_pattern: _data/external/vrms_data.json commit_message: Update meeting data diff --git a/.github/workflows/wins-data.yml b/.github/workflows/wins-data.yml index 49a34804a1..6ed91fc46f 100644 --- a/.github/workflows/wins-data.yml +++ b/.github/workflows/wins-data.yml @@ -15,12 +15,12 @@ jobs: - uses: actions/checkout@v2 - name: Save wins-data.json - run: curl -o _data/wins-data.json https://sheets.googleapis.com/v4/spreadsheets/1tj6eQlVLFgmskoXouVt87POxYVwR1yWT2vOSQEPyDtg/values/Responses?key=${{ secrets.WINS_API_KEY }} + run: curl -o _data/external/wins-data.json https://sheets.googleapis.com/v4/spreadsheets/1tj6eQlVLFgmskoXouVt87POxYVwR1yWT2vOSQEPyDtg/values/Responses?key=${{ secrets.WINS_API_KEY }} - uses: stefanzweifel/git-auto-commit-action@v3.0.0 with: # Optional glob pattern of files which should be added to the commit - file_pattern: _data/wins-data.json + file_pattern: _data/external/wins-data.json commit_message: Update wins data diff --git a/_data/_wins-data.json b/_data/external/_wins-data.json similarity index 100% rename from _data/_wins-data.json rename to _data/external/_wins-data.json diff --git a/_data/github-data.json b/_data/external/github-data.json similarity index 100% rename from _data/github-data.json rename to _data/external/github-data.json diff --git a/_data/vrms_data.json b/_data/external/vrms_data.json similarity index 100% rename from _data/vrms_data.json rename to _data/external/vrms_data.json diff --git a/_data/wins-data.json b/_data/external/wins-data.json similarity index 100% rename from _data/wins-data.json rename to _data/external/wins-data.json diff --git a/github-actions/github-data/get-project-data.js b/github-actions/github-data/get-project-data.js index bb05f0e44c..a1d03aa4c1 100644 --- a/github-actions/github-data/get-project-data.js +++ b/github-actions/github-data/get-project-data.js @@ -67,7 +67,7 @@ const octokit = new Octokit({ auth: core.getInput("token") }); * @return {Object} [Contains old project data as "oldGitHubData" and the date this script last ran as "dateLastRan"] */ function getLocalData(){ - let data = fs.readFileSync('_data/github-data.json', 'utf8'); + let data = fs.readFileSync('_data/external/github-data.json', 'utf8'); data = JSON.parse(data); if(Date.parse(data[0]) > 0){ let date = new Date(data[0]); @@ -186,7 +186,7 @@ function writeData(projectData){ projectData.sort(sortById); // Store the date this script finished running. dateRan is a global variable defined at the beginning of this script projectData.unshift(dateRan.toString()); - fs.writeFileSync('_data/github-data.json', JSON.stringify(projectData, null, 2)); + fs.writeFileSync('_data/external/github-data.json', JSON.stringify(projectData, null, 2)); } /** diff --git a/github-actions/wins-data/clean-and-save-wins-data.js b/github-actions/wins-data/clean-and-save-wins-data.js index 8693fa5e68..d8537a8836 100644 --- a/github-actions/wins-data/clean-and-save-wins-data.js +++ b/github-actions/wins-data/clean-and-save-wins-data.js @@ -2,7 +2,7 @@ const axios = require("axios"); const fs = require("fs"); const core = require("@actions/core"); -const PATH_TO_WRITE_FILE = "_data/_wins-data.json"; +const PATH_TO_WRITE_FILE = "_data/external/_wins-data.json"; const BASE_API_URL = "https://sheets.googleapis.com/v4/spreadsheets"; const SPREAD_SHEET_ID = "1zkr_dEyiT-WTksUkVyL4jYQuYC5_YvJCLrUIfBf1CeE";