PABPAT/TCI_Shield
0
1TCI Shield — Deployment Flow2Prerequisites3 4GitHub account with repository PABPAT/TCI_Shield5HuggingFace account6AWS account with Bedrock access7 8 9Step 1 — Create HuggingFace Space10 11Go to https://huggingface.co/new-space12Fill in:13 14Owner: PABPAT15Space name: TCI_Shield16SDK: Docker17Template: Streamlit18Hardware: CPU Basic (Free)19Visibility: Public20 21 22Click Create Space23 24 25Step 2 — Create HuggingFace Token26 27Go to https://huggingface.co/settings/tokens28Click New Token29 30Name: TCI_Shield31Type: Write32 33 34Copy the token35Login via CLI:36 37bashhf auth login --force38 39Select y for git credential40 41 42Step 3 — Add Token to GitHub Secrets43 44Go to https://github.com/PABPAT/TCI_Shield/settings/secrets/actions45Click New repository secret46 47Name: TCI_SHIELD_HUGGING_FACE48Value: your HuggingFace token49 50 51Click Add secret52 53 54Step 4 — Create GitHub Actions Workflow55Create .github/workflows/deploy.yml:56yamlname: Deploy to HuggingFace Spaces57 58on:59 push:60 branches:61 - main62 63jobs:64 deploy:65 runs-on: ubuntu-latest66 67 steps:68 - name: Checkout code69 uses: actions/checkout@v470 with:71 fetch-depth: 072 lfs: true73 74 - name: Push to HuggingFace Space75 env:76 HF_TOKEN: ${{ secrets.TCI_SHIELD_HUGGING_FACE }}77 run: |78 git config --global user.email "deploy@github-actions.com"79 git config --global user.name "GitHub Actions"80 git push https://oauth2:$HF_TOKEN@huggingface.co/spaces/PABPAT/TCI_Shield main --force81 82Step 5 — Add AWS Secrets to HuggingFace Space83 84Go to https://huggingface.co/spaces/PABPAT/TCI_Shield85Click Settings → Repository Secrets86Add:87 88NameValueAWS_ACCESS_KEY_IDyour AWS access keyAWS_SECRET_ACCESS_KEYyour AWS secret keyAWS_DEFAULT_REGIONus-east-189 90Click Restart Space91 92 93Step 6 — Deploy94Push any change to main branch:95bashgit add .96git commit -m "your message"97git push origin main98GitHub Actions automatically deploys to HuggingFace.99 100Ongoing Deployment101Every push to main triggers automatic deployment. No manual steps needed.