Skip to content

Workflow file for this run

name: Push to Hugging Face Space
# on:
# workflow_run:
# workflows:
# - CI
# branches:
# - main
# types:
# - completed
on: [push]
jobs:
push_to_hub:
runs-on: ubuntu-latest
env:
SRC_DIR: github-repo
DST_DIR: huggingface-repo
steps:
- name: Checkout GitHub repository
uses: actions/checkout@v3
with:
path: ${{ env.SRC_DIR }}
- name: Checkout Huggingface repository
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
HF_USERNAME: ${{ secrets.HF_USERNAME }}
run: |
git clone https://${HF_USERNAME}:${HF_TOKEN}@huggingface.co/spaces/${HF_USERNAME}/layout_alignment ${DST_DIR}
- name: Export requirements.txt
run: |
poetry export -f requirements.txt --output ${DST_DIR}/requirements.txt
- name: Copy files to Huggingface repository
run: |
cp ${SRC_DIR}/README.md ${DST_DIR}/README.md
cp ${SRC_DIR}/layout_alignment.py ${DST_DIR}/layout_alignment.py
git status