https://github.com/idea2app/web-file-cache
Web file cache service based on GitHub actions
https://github.com/idea2app/web-file-cache
Last synced: 4 months ago
JSON representation
Web file cache service based on GitHub actions
- Host: GitHub
- URL: https://github.com/idea2app/web-file-cache
- Owner: idea2app
- License: agpl-3.0
- Created: 2024-11-29T16:28:58.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-10-30T15:03:13.000Z (8 months ago)
- Last Synced: 2025-10-30T16:41:09.661Z (8 months ago)
- Size: 20.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Web-file-cache
Web file cache service based on [GitHub actions][1]
[][2]
## Technologies
- Crawler: [`web-fetch`][3] ([Puppeteer][4] based)
- CDN: [JSDelivr][5]
- OSS service: [Cloudflare R2][6]
## Usage
### Setup repository
1. Install GitHub apps in your organization or account:
1. [Probot settings][7]: set up Issue labels & Pull Request rules
2. Click the **[Use this template][8] button** on the top of this GitHub repository's home page, then create your own repository in the app-installed namespace above
3. Set Cloudflare variables is [`.github/workflows/crawler.yml`][9] as [Repository secrets][10]
### Manual cache
https://github.com/idea2app/Web-file-cache/issues/new?template=crawler.yml
### Automatic cache
```shell
URL="https://example.com/test.html"
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer " \
-H "X-GitHub-Api-Version: 2022-11-28" \
-d "{\"ref\":\"main\",\"inputs\":{\"url\":\"$URL\"}}" \
https://api.github.com/repos/your-namespace/Web-file-cache/actions/workflows/crawler.yml/dispatches
```
[1]: https://github.com/features/actions
[2]: https://github.com/idea2app/Web-file-cache/actions/workflows/crawler.yml
[3]: https://github.com/TechQuery/Web-fetch
[4]: https://pptr.dev/
[5]: https://www.jsdelivr.com/
[6]: https://www.cloudflare.com/developer-platform/products/r2/
[7]: https://github.com/apps/settings
[8]: https://github.com/new?template_name=Web-file-cache&template_owner=idea2app
[9]: .github/workflows/crawler.yml
[10]: https://github.com/idea2app/Web-file-cache/settings/secrets/actions