From 3c03d61fc828337714bc99277079d2619e7418bf Mon Sep 17 00:00:00 2001 From: Archie Wood <58074498+archiewood@users.noreply.github.com> Date: Mon, 2 Dec 2024 13:24:58 -0500 Subject: [PATCH] more explicit GH secrets intstructions --- .../pages/deployment/hugging-face-spaces/index.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sites/docs/pages/deployment/hugging-face-spaces/index.md b/sites/docs/pages/deployment/hugging-face-spaces/index.md index 2607b0a554..dd474587bd 100644 --- a/sites/docs/pages/deployment/hugging-face-spaces/index.md +++ b/sites/docs/pages/deployment/hugging-face-spaces/index.md @@ -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 settings page 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