Skip to content

Commit

Permalink
more explicit GH secrets intstructions
Browse files Browse the repository at this point in the history
  • Loading branch information
archiewood committed Dec 2, 2024
1 parent 1dc6c5b commit 3c03d61
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions sites/docs/pages/deployment/hugging-face-spaces/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@ Hugging Face is an open-source platform for machine learning and artificial inte
- Space SDK: `Static`
- Static template: `Blank`
- Choose a visibility: `Public` or `Private` depending on your needs
1. Go to [Access Tokens](https://huggingface.co/settings/tokens) and create a new accesstoken
1. Create a new [Access Tokens](https://huggingface.co/settings/tokens)
- Token Type: `Fine-grained`
- Name: e.g. `Evidence`
- Repositories Permissions: Choose the space you just created, and select `Read access to contents of selected repos` `Write access to contents/settings of selected repos`
- Select Create Token
1. Copy the token, and add it to your GitHub repo as a secret named `HUGGINGFACE_TOKEN`
- Repositories Permissions: Choose the space you just created, and select `Read access to contents of selected repos` and `Write access to contents/settings of selected repos`
- Select Create Token, and save it somewhere safe
1. Add secrets to your GitHub repo: Settings > Secrets and variables > Actions
- Firstly add your Hugging Face Tokent as a secret named `HUGGINGFACE_TOKEN`
- With your Evidence dev server running, go to the <a href=http://localhost:3000/settings#deploy target="_blank" class="markdown">settings page</a> and copy each of the environment variables
- Alternatively, you can find credentials in `connection.options.yaml` files in your `/sources/your_source` directory. The key format used should be `EVIDENCE_SOURCE__[your_source]__[option_name]` (Note the casing matches your source names, and the double underscores). Note that the values are base64 encoded, and will need to be decoded.
1. Create the deploy workflow file: `.github/workflows/deploy.yml`, update the repo name and space name, and merge it into your main branch
```yaml
name: Deploy to Hugging Face Space on Merge
Expand Down

0 comments on commit 3c03d61

Please sign in to comment.