From 600097c9765c8c582baae4561af854d8217b50b4 Mon Sep 17 00:00:00 2001 From: William Harrison Date: Mon, 6 Mar 2023 06:59:14 +0800 Subject: [PATCH] Create raw-api.yml --- .github/workflows/raw-api.yml | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/raw-api.yml diff --git a/.github/workflows/raw-api.yml b/.github/workflows/raw-api.yml new file mode 100644 index 0000000..b20c81f --- /dev/null +++ b/.github/workflows/raw-api.yml @@ -0,0 +1,46 @@ +name: Raw API + +on: + push: + branches: [main] + paths: + - "domains/*" + - ".github/workflows/raw-api.yml" + - "scripts/raw-api.js" + +jobs: + update: + name: Update + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: 16 + + - run: mkdir raw-api + + - name: Create CNAME + run: echo "raw.freesubdomains.org" > ./raw-api/CNAME + + - name: Create index.json + run: echo "" > ./raw-api/index.json + + - name: Run Script + run: node scripts/raw-api.js + + - name: Push + uses: cpina/github-action-push-to-another-repository@main + with: + source-directory: "raw-api" + destination-github-username: is-a-good-dev + destination-repository-name: raw-api + user-email: bot@is-a-good.dev + user-name: is-a-good-dev-BOT + commit-message: "Update Data via is-a-good-dev/register" + env: + API_TOKEN_GITHUB: ${{ secrets.BOT_PAT_TOKEN }}