Skip to content

Commit

Permalink
first upload
Browse files Browse the repository at this point in the history
  • Loading branch information
yinan-c committed Sep 7, 2023
1 parent bdf5f5e commit 70e7481
Show file tree
Hide file tree
Showing 17 changed files with 9,151 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/cron-job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: cron_job

# Controls when the workflow will run
on:
# cron job every 2 hours
schedule:
- cron: '0 */2 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-20.04

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check out repository
uses: actions/checkout@v3
with:
token: ${{ secrets.WORK_TOKEN }}

- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: ls_show
run: |
python main.py
ls -al rss/
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

- name: PUSH
env:
U_NAME: ${{ secrets.U_NAME }}
U_EMAIL: ${{ secrets.U_EMAIL }}
run: |
pwd
git config --local user.name "${U_NAME}"
git config --local user.email "${U_EMAIL}"
git status -s
git add rss/*
git add README.md
export TZ='Europe/London'
git commit -m "Github RSS Summary Auto Builder at `date +"%Y-%m-%d %H:%M"`"
echo "======git push===="
git push
51 changes: 51 additions & 0 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll with GitHub Pages dependencies preinstalled

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./rss/
destination: ./_site/rss/
- name: Upload artifact
uses: actions/upload-pages-artifact@v2

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
Empty file added .gitignore
Empty file.
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11.3
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# RSS-GPT
ChatGPT summary of your RSS feeds

- https://www.ifanr.com/feed -> https://yinan.me/RSS-summary/rss/ifanr.xml
- https://brett.trpstra.net/brettterpstra -> https://yinan.me/RSS-summary/rss/brett-terpstra.xml
- https://meta.appinn.net/tag/chrome.rss, https://meta.appinn.net/tag/ios.rss, https://meta.appinn.net/tag/macos.rss -> https://yinan.me/RSS-summary/rss/appinn.xml
22 changes: 22 additions & 0 deletions config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[cfg]
base = "rss/"
keyword_length = "5"
summary_length = "200"

[source001]
name = "ifanr"
url = "https://www.ifanr.com/feed"
max_items = "5"

[source002]
name = "brett-terpstra"
url = "https://brett.trpstra.net/brettterpstra"
max_items = "5"
filter_apply = "title"
filter_type = "exclude"
filter_rule = "TextExpander"

[source003]
name = "appinn"
url = "https://meta.appinn.net/tag/chrome.rss,https://meta.appinn.net/tag/ios.rss,https://meta.appinn.net/tag/macos.rss"
max_items = "0"
Loading

0 comments on commit 70e7481

Please sign in to comment.