Merge branch 'main' of https://gitea.proxy.liyanyan.work/liyy/iptv-gh-pages
All checks were successful
Build and Deploy on Main Merge / deploy (push) Successful in 10s
All checks were successful
Build and Deploy on Main Merge / deploy (push) Successful in 10s
This commit is contained in:
commit
d97258b23b
40
.gitea/workflows/deploy.yml
Normal file
40
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,40 @@
|
||||
name: Build and Deploy on Main Merge
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
REGISTRY_HOST: gitea.proxy.liyanyan.work
|
||||
DOCKER_NAME: iptv-gh-pages
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-22.04
|
||||
container:
|
||||
volumes:
|
||||
- /vol1/1000/app:/app
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: https://gitea.proxy.liyanyan.work/github/checkout@v4
|
||||
|
||||
- name: Prepare deploy directory
|
||||
run: |
|
||||
mkdir -p /app/${{ gitea.repository }}/site/
|
||||
cp -f docker-compose.yml /app/${{ gitea.repository }}/
|
||||
find . -maxdepth 1 ! -name docker-compose.yml ! -name .git ! -name .gitea ! -name . -exec cp -rf {} /app/${{ gitea.repository }}/site/ \;
|
||||
chmod -R a+r,a+X /app/${{ gitea.repository }}/site/
|
||||
|
||||
- name: Run with docker compose
|
||||
run: |
|
||||
cd /app/${{ gitea.repository }}
|
||||
if [ $(docker ps -q -f name=${DOCKER_NAME}) ]; then
|
||||
echo 服务已启动...
|
||||
docker compose down
|
||||
docker compose up -d
|
||||
else
|
||||
echo 服务启动中...
|
||||
docker compose up -d
|
||||
fi
|
||||
65
README.md
Normal file
65
README.md
Normal file
@ -0,0 +1,65 @@
|
||||
# IPTV Playlist Aggregator(IPTV 播放列表聚合)
|
||||
|
||||
为解决中国大陆访问 GitHub 不稳定的问题,本项目作为 [iptv-org/iptv](https://github.com/iptv-org/iptv.git) 的镜像中转站而构建。原项目收集、整理全球免费 IPTV 直播源,按多维度分类生成 M3U 播放列表。
|
||||
|
||||
## 项目结构
|
||||
|
||||
```
|
||||
.
|
||||
├── index.m3u # 全量聚合播放列表
|
||||
├── index.category.m3u # 按分类索引
|
||||
├── index.country.m3u # 按国家/地区索引
|
||||
├── index.language.m3u # 按语言索引
|
||||
├── categories/ # 按内容类型分类(新闻、体育、电影等)
|
||||
├── countries/ # 按国家/地区代码分类(cn、us、jp 等)
|
||||
├── languages/ # 按语言代码分类(zho、eng、jpn 等)
|
||||
├── regions/ # 按地理区域分类(eu、asia、latam 等)
|
||||
├── cities/ # 按城市分类
|
||||
├── subdivisions/ # 按行政区划分分类
|
||||
├── sources/ # 按来源/平台分类(pluto、samsung 等)
|
||||
├── raw/ # 原始数据
|
||||
├── docker-compose.yml # Docker 部署配置
|
||||
└── .gitea/workflows/deploy.yml # 自动部署工作流
|
||||
```
|
||||
|
||||
## 分支说明
|
||||
|
||||
### `main` —— 本地/内网部署分支
|
||||
|
||||
- **用途**:本地开发、测试以及内网(Gitea Actions)自动部署。
|
||||
- **工作流**:推送代码到 `main` 分支后,Gitea Actions 自动将 M3U 文件同步到本地服务器,并通过 Docker Compose 启动 Nginx 对外提供静态文件服务。
|
||||
- **部署方式**:使用 `docker-compose.yml` 拉取 Nginx Alpine 镜像,将 `site/` 目录挂载为 Web 根目录,监听 `65500` 端口。
|
||||
|
||||
### `cloud` —— 上游同步分支
|
||||
|
||||
- **用途**:定时从上游项目 [iptv-org/iptv](https://github.com/iptv-org/iptv.git) 拉取最新代码,并将同步结果推送回 Gitea 镜像仓库。
|
||||
- **注意**:启动之前需要修改`.env`文件的`GITEA_TOKEN`字段。
|
||||
|
||||
## 本地运行
|
||||
|
||||
```bash
|
||||
# 将 M3U 文件复制到 site 目录
|
||||
mkdir -p site
|
||||
cp -r categories countries languages regions cities subdivisions sources raw *.m3u site/
|
||||
|
||||
# 启动 Nginx 服务
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
访问 `http://localhost:65500` 即可获取播放列表。
|
||||
|
||||
## 使用方式
|
||||
|
||||
在支持 M3U 的 IPTV 播放器(如 VLC、Kodi、IPTV Smarters 等)中添加以下地址:
|
||||
|
||||
```
|
||||
http://<你的服务器地址>:65500/index.m3u
|
||||
```
|
||||
|
||||
也可以按需加载分类列表,例如:
|
||||
|
||||
```
|
||||
http://<你的服务器地址>:65500/countries/cn.m3u # 中国地区直播源
|
||||
http://<你的服务器地址>:65500/categories/sports.m3u # 体育频道
|
||||
http://<你的服务器地址>:65500/languages/zho.m3u # 中文频道
|
||||
```
|
||||
11
docker-compose.yml
Normal file
11
docker-compose.yml
Normal file
@ -0,0 +1,11 @@
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
iptv-gh-pages:
|
||||
image: docker.liyanyan.work/library/nginx:alpine
|
||||
container_name: iptv-gh-pages
|
||||
ports:
|
||||
- "65500:80"
|
||||
volumes:
|
||||
- ./site:/usr/share/nginx/html:ro
|
||||
restart: unless-stopped
|
||||
Loading…
x
Reference in New Issue
Block a user