PDF Insight Pro ships with a ready-to-use GitHub Actions CI/CD pipeline defined inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Jatin-Mehra119/PDF-Insight-Beta/llms.txt
Use this file to discover all available pages before exploring further.
.github/workflows/sync_to_hf.yml. Every time a commit is pushed to the main branch, the workflow checks out the full git history, swaps in the HF-specific README_hf.md as the Space card, and force-pushes the repository to your Hugging Face Space. Hugging Face then picks up the Dockerfile at the repo root and builds the container automatically.
Prerequisites
- A Hugging Face account
- A Hugging Face Space created with the Docker SDK
- A Hugging Face access token with write permission to the Space
- A fork of the PDF Insight Pro GitHub repository
Setup
Fork the repository
Click Fork on the PDF-Insight-Beta
GitHub page to create your own copy. All subsequent steps apply to your fork.
Create a Hugging Face Space
- Go to huggingface.co/new-space.
- Choose a space name (e.g.,
PDF-Insight-PRO). - Select Docker as the Space SDK.
- Set visibility to Public or Private as required.
- Click Create Space — an empty Space is created and ready to receive pushes.
Add HF_TOKEN as a GitHub Actions secret
- In your forked GitHub repository, navigate to Settings → Secrets and variables → Actions.
- Click New repository secret.
- Name it
HF_TOKENand paste your Hugging Face access token as the value. - Click Add secret.
${{ secrets.HF_TOKEN }} to authenticate the git push to Hugging Face.Add API keys as Hugging Face Space secrets
API keys must be injected at Docker build time by Hugging Face. Add them in
the Space settings — not in the GitHub repository.
- Open your Space on Hugging Face.
- Go to Settings → Variables and secrets.
- Add two secrets:
GROQ_API_KEY— your Groq API keyTAVILY_API_KEY— your Tavily API key
--mount=type=secret instructions in the Dockerfile.Update the workflow with your username and space name
Open Commit and push this change to
.github/workflows/sync_to_hf.yml in your fork and update the two
hardcoded environment variables to match your Hugging Face account:main.Workflow File
The full workflow is shown below for reference.Space Configuration
Port mapping
The Dockerfile exposes port 7860 and Uvicorn binds to0.0.0.0:7860. Hugging Face Spaces automatically maps this container port to the public HTTPS URL of your Space — no additional port configuration is required.
Secrets management
| Secret | Where to set it | Purpose |
|---|---|---|
HF_TOKEN | GitHub repository → Actions secrets | Authenticates the git push from the workflow to Hugging Face |
GROQ_API_KEY | HF Space → Variables and secrets | Injected as a Docker build secret for the LLM backend |
TAVILY_API_KEY | HF Space → Variables and secrets | Injected as a Docker build secret for web search integration |
The repository contains a
README_hf.md file alongside the standard README.md.
README_hf.md holds the Hugging Face Space card YAML front-matter (title, emoji,
colorFrom, colorTo, sdk, app_port, license, etc.). The workflow swaps it in as
README.md before pushing so that Hugging Face renders the correct Space card
metadata without polluting the GitHub repository’s main README.