Skip to content

Deploy to Hugging Face via SSH (passphrase key) #9

Deploy to Hugging Face via SSH (passphrase key)

Deploy to Hugging Face via SSH (passphrase key) #9

Workflow file for this run

name: Deploy to Hugging Face via SSH
on:
push:
branches: [main]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.HF_SSH_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan huggingface.co >> ~/.ssh/known_hosts
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
- name: Push to Hugging Face Space
run: |
git remote add hf git@huggingface.co:spaces/daniellegauthier/RGB-Root-Matriz-Color-Plotter
git push -f hf main