Process News #17111
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Process News | |
on: | |
schedule: | |
- cron: "*/24 * * * *" | |
jobs: | |
pull: | |
runs-on: self-hosted | |
steps: | |
- name: Pull the News from the Brave Search API | |
run: | | |
curl --request POST \ | |
--url 'https://www.tecnobuc.com/api/news/pull/brave' \ | |
--header 'x-api-key: ${{ secrets.API_KEY }}' | |
parse: | |
runs-on: self-hosted | |
needs: pull | |
steps: | |
- name: Parse the News using Readability | |
run: | | |
curl --request POST \ | |
--url 'https://www.tecnobuc.com/api/news/parse' \ | |
--header 'x-api-key: ${{ secrets.API_KEY }}' | |
embed: | |
runs-on: self-hosted | |
needs: parse | |
steps: | |
- name: Generate Embedings for the News | |
run: | | |
curl --request POST \ | |
--url 'https://www.tecnobuc.com/api/news/embed' \ | |
--header 'x-api-key: ${{ secrets.API_KEY }}' | |
get_images: | |
runs-on: self-hosted | |
needs: embed | |
steps: | |
- name: Get Preview Images for the News | |
run: | | |
curl --request POST \ | |
--url 'https://www.tecnobuc.com/api/news/get-image' \ | |
--header 'x-api-key: ${{ secrets.API_KEY }}' | |
filter: | |
runs-on: self-hosted | |
needs: get_images | |
steps: | |
- name: Filter the Unrelevant News | |
run: | | |
curl --request POST \ | |
--url 'https://www.tecnobuc.com/api/news/filter' \ | |
--header 'x-api-key: ${{ secrets.API_KEY }}' | |
clean: | |
runs-on: self-hosted | |
steps: | |
- name: Clear the Not Generated News | |
run: | | |
curl --request POST \ | |
--url 'https://www.tecnobuc.com/api/news/clean' \ | |
--header 'x-api-key: ${{ secrets.API_KEY }}' |