From dfd892c2200e887e87e2955511205fc09a82f998 Mon Sep 17 00:00:00 2001 From: William Harrison Date: Tue, 14 Feb 2023 19:18:27 +0800 Subject: [PATCH] update raw api --- .github/workflows/{raw.yml => raw-api.yml} | 6 +++--- raw-api/CNAME | 1 + raw-api/index.json | 0 raw/index.json | 1 - scripts/{raw.js => raw-api.js} | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename .github/workflows/{raw.yml => raw-api.yml} (82%) create mode 100644 raw-api/CNAME create mode 100644 raw-api/index.json delete mode 100644 raw/index.json rename scripts/{raw.js => raw-api.js} (88%) diff --git a/.github/workflows/raw.yml b/.github/workflows/raw-api.yml similarity index 82% rename from .github/workflows/raw.yml rename to .github/workflows/raw-api.yml index df1ae1d..c48ef90 100644 --- a/.github/workflows/raw.yml +++ b/.github/workflows/raw-api.yml @@ -20,14 +20,14 @@ jobs: - name: Run Script run: | - node scripts/raw.js + node scripts/raw-api.js - name: Push Data uses: cpina/github-action-push-to-another-repository@main with: - source-directory: "raw" + source-directory: "raw-api" destination-github-username: free-domains - destination-repository-name: raw + destination-repository-name: raw-api user-email: actions@github.com user-name: github-actions commit-message: "Update Data via free-domains/register" diff --git a/raw-api/CNAME b/raw-api/CNAME new file mode 100644 index 0000000..bfabf07 --- /dev/null +++ b/raw-api/CNAME @@ -0,0 +1 @@ +raw.freesubdomains.org \ No newline at end of file diff --git a/raw-api/index.json b/raw-api/index.json new file mode 100644 index 0000000..e69de29 diff --git a/raw/index.json b/raw/index.json deleted file mode 100644 index 8b13789..0000000 --- a/raw/index.json +++ /dev/null @@ -1 +0,0 @@ - diff --git a/scripts/raw.js b/scripts/raw-api.js similarity index 88% rename from scripts/raw.js rename to scripts/raw-api.js index 87f3e6c..58357b3 100644 --- a/scripts/raw.js +++ b/scripts/raw-api.js @@ -36,7 +36,7 @@ fs.readdir(directoryPath, function (err, files) { combinedArray = combinedArray.concat(dataArray); if(combinedArray.length === files.length) { - fs.writeFile("raw/index.json", JSON.stringify(combinedArray), (err) => { + fs.writeFile("raw-api/index.json", JSON.stringify(combinedArray), (err) => { if(err) throw err; }) }