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

Files changed (4) hide show
  1. .github/workflows/ci.yml +41 -1
  2. Makefile +17 -5
  3. README_en.md +8 -0
  4. 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. See [GitHub repo](https://github.com/${{ github.repository }}) for full documentation.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
- "Headless browser rendering API. See [GitHub repo]($$(git remote get-url origin | sed 's/\.git$$//; s|git@github.com:|https://github.com/|')) for full documentation." \
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 - Remove build artifacts"
103
- @echo " deploy-dev - Build dev image and deploy to remote VPS"
104
- @echo " deploy-hf - Deploy to Hugging Face Spaces"
 
 
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
+ [![PyPI version](https://img.shields.io/pypi/v/veilrender?color=green)](https://pypi.org/project/veilrender/)
4
+ [![GitHub release](https://img.shields.io/github/v/release/Oaklight/veilrender?color=green)](https://github.com/Oaklight/veilrender/releases/latest)
5
+ [![CI](https://github.com/Oaklight/veilrender/actions/workflows/ci.yml/badge.svg)](https://github.com/Oaklight/veilrender/actions/workflows/ci.yml)
6
+ [![Docker Pulls](https://img.shields.io/docker/pulls/oaklight/veilrender)](https://hub.docker.com/r/oaklight/veilrender)
7
+ [![Docker Image](https://img.shields.io/docker/v/oaklight/veilrender?sort=semver&label=docker)](https://hub.docker.com/r/oaklight/veilrender)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
9
+ [![HF Spaces](https://img.shields.io/badge/%F0%9F%A4%97-Spaces-blue)](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
+ [![PyPI version](https://img.shields.io/pypi/v/veilrender?color=green)](https://pypi.org/project/veilrender/)
4
+ [![GitHub release](https://img.shields.io/github/v/release/Oaklight/veilrender?color=green)](https://github.com/Oaklight/veilrender/releases/latest)
5
+ [![CI](https://github.com/Oaklight/veilrender/actions/workflows/ci.yml/badge.svg)](https://github.com/Oaklight/veilrender/actions/workflows/ci.yml)
6
+ [![Docker Pulls](https://img.shields.io/docker/pulls/oaklight/veilrender)](https://hub.docker.com/r/oaklight/veilrender)
7
+ [![Docker Image](https://img.shields.io/docker/v/oaklight/veilrender?sort=semver&label=docker)](https://hub.docker.com/r/oaklight/veilrender)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
9
+ [![HF Spaces](https://img.shields.io/badge/%F0%9F%A4%97-Spaces-blue)](https://huggingface.co/spaces/oaklight/veilrender)
10
+
11
  **ไธญๆ–‡** | [English](README_en.md)
12
 
13
  ๆ— ๅคดๆต่งˆๅ™จๆธฒๆŸ“ APIโ€”โ€”ๅฏ่‡ชๆ‰˜็ฎกไบŽ HF Spacesใ€Docker ๆˆ–็‰ฉ็†ๆœบใ€‚