|
|
name: Build and Push to Hugging Face Space |
|
|
|
|
|
on: |
|
|
push: |
|
|
branches: |
|
|
- main |
|
|
|
|
|
jobs: |
|
|
deploy: |
|
|
runs-on: ubuntu-latest |
|
|
steps: |
|
|
- name: Checkout code |
|
|
uses: actions/checkout@v3 |
|
|
with: |
|
|
lfs: true |
|
|
|
|
|
- name: Set up Docker Buildx |
|
|
uses: docker/setup-buildx-action@v2 |
|
|
|
|
|
- name: Login to Hugging Face Registry |
|
|
env: |
|
|
HF_TOKEN: ${{ secrets.HF_TOKEN }} |
|
|
run: echo $HF_TOKEN | docker login registry.hf.space -u ezmary --password-stdin |
|
|
|
|
|
- name: Build and Push |
|
|
|
|
|
run: | |
|
|
docker build -t registry.hf.space/ezmary/chat:latest . |
|
|
docker push registry.hf.space/ezmary/chat:latest |
|
|
|