Files
old-free-domains/.github/workflows/raw-api.yml
T

49 lines
1.3 KiB
YAML

name: Raw API
on:
workflow_dispatch: {}
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: free-domains
destination-repository-name: raw-api
user-email: bot@freesubdomains.org
user-name: free-domains-bot
commit-message: "Update Data via free-domains/register"
env:
API_TOKEN_GITHUB: ${{ secrets.BOT }}