Spaces:
Paused
Paused
Peng Ding commited on
Commit ยท
3f2a039
1
Parent(s): 1293e20
add badges, PyPI publish workflow, and DockerHub/HF Space descriptions
Browse files- Add PyPI, GitHub release, CI, Docker, License, HF Spaces badges to both READMEs
- Add publish-pypi CI job (tag-triggered, trusted publisher)
- Add build-package/push-package Makefile targets
- Update HF Space README with bilingual description and links
- .github/workflows/ci.yml +41 -1
- Makefile +17 -5
- README_en.md +8 -0
- README_zh.md +8 -0
.github/workflows/ci.yml
CHANGED
|
@@ -79,6 +79,28 @@ jobs:
|
|
| 79 |
cache-from: type=gha
|
| 80 |
cache-to: type=gha,mode=max
|
| 81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
deploy-hf:
|
| 83 |
needs: lint
|
| 84 |
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))
|
|
@@ -104,7 +126,25 @@ jobs:
|
|
| 104 |
|
| 105 |
# VeilRender
|
| 106 |
|
| 107 |
-
Headless browser rendering API
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
FRONTMATTER
|
| 109 |
sed -i 's/^ //' README.md
|
| 110 |
rm -rf .github .pre-commit-config.yaml CLAUDE.md README_en.md README_zh.md Makefile
|
|
|
|
| 79 |
cache-from: type=gha
|
| 80 |
cache-to: type=gha,mode=max
|
| 81 |
|
| 82 |
+
publish-pypi:
|
| 83 |
+
needs: lint
|
| 84 |
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
| 85 |
+
runs-on: ubuntu-latest
|
| 86 |
+
permissions:
|
| 87 |
+
id-token: write
|
| 88 |
+
steps:
|
| 89 |
+
- uses: actions/checkout@v6
|
| 90 |
+
|
| 91 |
+
- name: Set up Python 3.10
|
| 92 |
+
uses: actions/setup-python@v6
|
| 93 |
+
with:
|
| 94 |
+
python-version: "3.10"
|
| 95 |
+
|
| 96 |
+
- name: Build package
|
| 97 |
+
run: |
|
| 98 |
+
python -m pip install --upgrade pip build
|
| 99 |
+
python -m build
|
| 100 |
+
|
| 101 |
+
- name: Publish to PyPI
|
| 102 |
+
uses: pypa/gh-action-pypi-publish@release/v1
|
| 103 |
+
|
| 104 |
deploy-hf:
|
| 105 |
needs: lint
|
| 106 |
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))
|
|
|
|
| 126 |
|
| 127 |
# VeilRender
|
| 128 |
|
| 129 |
+
Headless browser rendering API โ accepts a URL, renders with headless Chromium, returns HTML / Markdown / readability content.
|
| 130 |
+
|
| 131 |
+
ๆ ๅคดๆต่งๅจๆธฒๆ API โ ๆฅๆถ URL๏ผ้่ฟๆ ๅคด Chromium ๆธฒๆ๏ผ่ฟๅ HTML / Markdown / ๅฏ่ฏปๆงๆๅๅ
ๅฎนใ
|
| 132 |
+
|
| 133 |
+
> **Note / ๆณจๆ**: This Space is a demo instance with limited resources. For production use, self-host via Docker.
|
| 134 |
+
>
|
| 135 |
+
> ๆญค Space ไธบๆผ็คบๅฎไพ๏ผ่ตๆบๆ้ใ็ไบง็ฏๅข่ฏท้่ฟ Docker ่ช่ก้จ็ฝฒใ
|
| 136 |
+
|
| 137 |
+
## Links
|
| 138 |
+
|
| 139 |
+
- **GitHub**: [Oaklight/veilrender](https://github.com/${{ github.repository }}) โ source code, docs & issues
|
| 140 |
+
- **Docker Hub**: [oaklight/veilrender](https://hub.docker.com/r/oaklight/veilrender) โ pre-built multi-arch images
|
| 141 |
+
- **GHCR**: `ghcr.io/oaklight/veilrender`
|
| 142 |
+
|
| 143 |
+
## Quick Start
|
| 144 |
+
|
| 145 |
+
```bash
|
| 146 |
+
docker run -p 7860:7860 -e VEILRENDER_API_TOKEN=your-secret oaklight/veilrender
|
| 147 |
+
```
|
| 148 |
FRONTMATTER
|
| 149 |
sed -i 's/^ //' README.md
|
| 150 |
rm -rf .github .pre-commit-config.yaml CLAUDE.md README_en.md README_zh.md Makefile
|
Makefile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
.PHONY: dev build run lint typecheck vendor clean deploy-dev deploy-hf help
|
| 2 |
|
| 3 |
REGISTRY_MIRROR ?= docker.io
|
| 4 |
DOCKER_IMAGE := oaklight/veilrender
|
|
@@ -27,6 +27,16 @@ clean:
|
|
| 27 |
rm -rf build/ dist/ *.egg-info/ src/*.egg-info/
|
| 28 |
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 31 |
# Dev Deployment
|
| 32 |
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
@@ -82,7 +92,7 @@ endif
|
|
| 82 |
'' \
|
| 83 |
'# VeilRender' \
|
| 84 |
'' \
|
| 85 |
-
|
| 86 |
> README.md; \
|
| 87 |
rm -rf .github .pre-commit-config.yaml CLAUDE.md README_en.md README_zh.md Makefile; \
|
| 88 |
git add -A; \
|
|
@@ -99,9 +109,11 @@ help:
|
|
| 99 |
@echo " lint - Run ruff check and format"
|
| 100 |
@echo " typecheck - Run ty check"
|
| 101 |
@echo " vendor - Re-vendor zerodep modules"
|
| 102 |
-
@echo " clean
|
| 103 |
-
@echo "
|
| 104 |
-
@echo "
|
|
|
|
|
|
|
| 105 |
@echo ""
|
| 106 |
@echo "Variables:"
|
| 107 |
@echo " SSH_TARGET=<host> - SSH target for deploy-dev (required)"
|
|
|
|
| 1 |
+
.PHONY: dev build run lint typecheck vendor clean build-package push-package deploy-dev deploy-hf help
|
| 2 |
|
| 3 |
REGISTRY_MIRROR ?= docker.io
|
| 4 |
DOCKER_IMAGE := oaklight/veilrender
|
|
|
|
| 27 |
rm -rf build/ dist/ *.egg-info/ src/*.egg-info/
|
| 28 |
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
|
| 29 |
|
| 30 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 31 |
+
# Package targets
|
| 32 |
+
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 33 |
+
|
| 34 |
+
build-package: clean
|
| 35 |
+
python -m build
|
| 36 |
+
|
| 37 |
+
push-package:
|
| 38 |
+
twine upload dist/*
|
| 39 |
+
|
| 40 |
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 41 |
# Dev Deployment
|
| 42 |
# โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
|
|
| 92 |
'' \
|
| 93 |
'# VeilRender' \
|
| 94 |
'' \
|
| 95 |
+
'Headless browser rendering API. See [GitHub repo](https://github.com/Oaklight/veilrender) for full documentation.' \
|
| 96 |
> README.md; \
|
| 97 |
rm -rf .github .pre-commit-config.yaml CLAUDE.md README_en.md README_zh.md Makefile; \
|
| 98 |
git add -A; \
|
|
|
|
| 109 |
@echo " lint - Run ruff check and format"
|
| 110 |
@echo " typecheck - Run ty check"
|
| 111 |
@echo " vendor - Re-vendor zerodep modules"
|
| 112 |
+
@echo " clean - Remove build artifacts"
|
| 113 |
+
@echo " build-package - Build Python package"
|
| 114 |
+
@echo " push-package - Push package to PyPI"
|
| 115 |
+
@echo " deploy-dev - Build dev image and deploy to remote VPS"
|
| 116 |
+
@echo " deploy-hf - Deploy to Hugging Face Spaces"
|
| 117 |
@echo ""
|
| 118 |
@echo "Variables:"
|
| 119 |
@echo " SSH_TARGET=<host> - SSH target for deploy-dev (required)"
|
README_en.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
| 1 |
# VeilRender
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
[ไธญๆ](README_zh.md) | **English**
|
| 4 |
|
| 5 |
Headless browser rendering API โ self-hostable on HF Spaces, Docker, or bare metal.
|
|
|
|
| 1 |
# VeilRender
|
| 2 |
|
| 3 |
+
[](https://pypi.org/project/veilrender/)
|
| 4 |
+
[](https://github.com/Oaklight/veilrender/releases/latest)
|
| 5 |
+
[](https://github.com/Oaklight/veilrender/actions/workflows/ci.yml)
|
| 6 |
+
[](https://hub.docker.com/r/oaklight/veilrender)
|
| 7 |
+
[](https://hub.docker.com/r/oaklight/veilrender)
|
| 8 |
+
[](https://opensource.org/licenses/MIT)
|
| 9 |
+
[](https://huggingface.co/spaces/oaklight/veilrender)
|
| 10 |
+
|
| 11 |
[ไธญๆ](README_zh.md) | **English**
|
| 12 |
|
| 13 |
Headless browser rendering API โ self-hostable on HF Spaces, Docker, or bare metal.
|
README_zh.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
| 1 |
# VeilRender
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
**ไธญๆ** | [English](README_en.md)
|
| 4 |
|
| 5 |
ๆ ๅคดๆต่งๅจๆธฒๆ APIโโๅฏ่ชๆ็ฎกไบ HF SpacesใDocker ๆ็ฉ็ๆบใ
|
|
|
|
| 1 |
# VeilRender
|
| 2 |
|
| 3 |
+
[](https://pypi.org/project/veilrender/)
|
| 4 |
+
[](https://github.com/Oaklight/veilrender/releases/latest)
|
| 5 |
+
[](https://github.com/Oaklight/veilrender/actions/workflows/ci.yml)
|
| 6 |
+
[](https://hub.docker.com/r/oaklight/veilrender)
|
| 7 |
+
[](https://hub.docker.com/r/oaklight/veilrender)
|
| 8 |
+
[](https://opensource.org/licenses/MIT)
|
| 9 |
+
[](https://huggingface.co/spaces/oaklight/veilrender)
|
| 10 |
+
|
| 11 |
**ไธญๆ** | [English](README_en.md)
|
| 12 |
|
| 13 |
ๆ ๅคดๆต่งๅจๆธฒๆ APIโโๅฏ่ชๆ็ฎกไบ HF SpacesใDocker ๆ็ฉ็ๆบใ
|