Skip to content

Draft: Use pre-commit.ci to auto-update schemas #4

Draft: Use pre-commit.ci to auto-update schemas

Draft: Use pre-commit.ci to auto-update schemas #4

---
name: Update Schema
"on":
pull_request:
push:
branches:
- main
workflow_dispatch:
inputs: {}
jobs:
generate-schema:
name: Generate and Upload Schema
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install Poetry
run: python -m pip install poetry
- name: Install Dependencies
run: poetry install --only=main
- name: Generate schema
run: poetry run retasc generate-schema schema.yaml
- name: Prepare deployment directory
run: |
mkdir -p public
cp schema.yaml public/
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: public
publish_branch: gh-pages