feat: initial registry crawler setup

This commit is contained in:
dyzulk
2026-01-18 18:16:22 +07:00
parent fe71f287fe
commit 7bf19f3717
2 changed files with 207 additions and 0 deletions

52
.github/workflows/deploy.yml vendored Normal file
View File

@@ -0,0 +1,52 @@
name: Deploy Registry
on:
schedule:
- cron: '0 0 * * *' # Every midnight
workflow_dispatch: # Manual trigger
push:
branches:
- main # Trigger on push to main (e.g. script updates)
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
- name: Generate Registry & Releases
run: php scripts/generate_registry.php
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Upload the 'public' folder as an artifact for Pages
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'public'
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4