mirror of
https://github.com/mivodev/registry.git
synced 2026-01-26 05:25:40 +07:00
53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
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.GH_PAT }}
|
|
|
|
# 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
|