diff --git a/.github/workflows/friend_circle_lite.yml b/.github/workflows/friend_circle_lite.yml index e2b1827..b5df161 100644 --- a/.github/workflows/friend_circle_lite.yml +++ b/.github/workflows/friend_circle_lite.yml @@ -64,7 +64,7 @@ jobs: - name: Commit changes run: | mkdir pages - cp -r main index.html all.json errors.json pages/ + cp -r main ./static/index.html ./static/readme.md all.json errors.json pages/ cd pages git init git add . @@ -75,4 +75,18 @@ jobs: uses: Mattraks/delete-workflow-runs@v2 with: retain_days: 30 - keep_minimum_runs: 6 \ No newline at end of file + keep_minimum_runs: 6 + + keepalive-workflow: + name: Keepalive Workflow + if: ${{ always() }} + needs: friend-circle-lite + runs-on: ubuntu-latest + permissions: + actions: write + steps: + - uses: actions/checkout@v4 + - uses: gautamkrishnar/keepalive-workflow@v2 + with: + committer_username: "github-actions[bot]" + committer_email: "github-actions[bot]@users.noreply.github.com" \ No newline at end of file diff --git a/readme.md b/readme.md index aedb1c7..e30444a 100644 --- a/readme.md +++ b/readme.md @@ -320,7 +320,7 @@ // 点击加载更多时,一次最多加载几篇文章,默认20 page_turning_number: 20, // 头像加载失败时,默认头像地址 - error_img: 'https://pic.imgdb.cn/item/6695daa4d9c307b7e953ee3d.jpg', // https://cdn.qyliu.top/i/2024/03/22/65fcea97b3ca6.png + error_img: 'https://i.p-i.vip/30/20240815-66bced9226a36.webp', } } @@ -353,7 +353,7 @@ cd Friend-Circle-Lite ```bash pip install -r ./requirements.txt -pip install -r ./requirements-server.txt +pip install -r ./server/requirements-server.txt ``` ### 部署API服务 diff --git a/server.py b/server.py index 2ba85b5..150ed36 100644 --- a/server.py +++ b/server.py @@ -21,7 +21,7 @@ app.add_middleware( @app.get("/", response_class=HTMLResponse) async def root(): try: - with open('./static/deploy-home.html', 'r', encoding='utf-8') as f: + with open('./server/deploy-home.html', 'r', encoding='utf-8') as f: html_content = f.read() return HTMLResponse(content=html_content) except FileNotFoundError: diff --git a/static/deploy-home.html b/server/deploy-home.html similarity index 100% rename from static/deploy-home.html rename to server/deploy-home.html diff --git a/requirements-server.txt b/server/requirements-server.txt similarity index 50% rename from requirements-server.txt rename to server/requirements-server.txt index 97dc7cd..f0615cf 100644 --- a/requirements-server.txt +++ b/server/requirements-server.txt @@ -1,2 +1,2 @@ fastapi -uvicorn +uvicorn \ No newline at end of file diff --git a/index.html b/static/index.html similarity index 100% rename from index.html rename to static/index.html diff --git a/static/readme.md b/static/readme.md new file mode 100644 index 0000000..5e9c453 --- /dev/null +++ b/static/readme.md @@ -0,0 +1,35 @@ +# RSS 订阅前端页面 + +这是一个用于展示 RSS 订阅内容的简单 HTML 页面。该前端页面用于渲染从后端获取的 RSS 订阅数据。本分支仅包含用于展示的静态资源(HTML、CSS、JS)。 + +## 功能 + +- **展示 RSS 订阅内容**:可以显示 RSS 订阅文章的标题、描述和发布时间。 +- **简洁设计**:简单直观的用户界面,适用于浏览和查看 RSS 内容。 +- **响应式布局**:适配不同设备的浏览体验。 + +## 部署到网站 + +如果你已经正确托管本分支到静态托管平台,你可以通过以下几个步骤将数据渲染到你的前端页面: + +在前端页面的md文件中写入: + +```html +
+ + + +``` + +其中第一个地址填入你自己的地址即可,**注意**尾部带`/`,不要遗漏。