Skip to content

Merge pull request #38 from ServerDeveloper9447/main #28

Merge pull request #38 from ServerDeveloper9447/main

Merge pull request #38 from ServerDeveloper9447/main #28

name: Sort Subdomains
on:
push:
paths:
- 'subdomains.json'
permissions:
contents: write
jobs:
sort:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Sort subdomains
run: npm run sort
- name: Commit and push if changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add subdomains.json
git diff-index --quiet HEAD || git commit -m "Auto-sort subdomains.json"
git push