Skip to content

fix(snic): normalize canvas_size to c(width, height) convention #11

fix(snic): normalize canvas_size to c(width, height) convention

fix(snic): normalize canvas_size to c(width, height) convention #11

name: Deploy to Hugging Face Spaces
on:
push:
branches: [main]
paths-ignore:
- 'quarto/**'
- 'docs/**'
- 'tests/**'
- '*.md'
- '!hf-spaces/README.md'
workflow_dispatch:
concurrency:
group: hf-spaces-deploy
cancel-in-progress: true
permissions:
contents: read
jobs:
deploy-hf:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Prepare HF Spaces deployment
run: |
cp hf-spaces/README.md README.md
rm -rf hf-spaces/
- name: Upload to Hugging Face Spaces
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
pip install huggingface_hub
python -c "
from huggingface_hub import HfApi
import os
api = HfApi(token=os.environ['HF_TOKEN'])
api.upload_folder(
folder_path='.',
repo_id='pjt222/jigsawR',
repo_type='space',
ignore_patterns=['.git/*'],
)
print('Upload complete!')
"