40 lines
1.0 KiB
YAML
40 lines
1.0 KiB
YAML
name: Update RSS Feed
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 6 * * *' # every day at 6:00 GMT (7CET/8CEST)
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
update-feed:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: https://gitea.com/actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
|
|
|
- name: Set up Python
|
|
uses: https://gitea.com/actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
|
with:
|
|
python-version: '3.9'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install -r requirements.txt
|
|
|
|
- name: Run Scrape Obec Žižkovo Pole
|
|
env:
|
|
FB_PAGE: "obec.zizkovopole"
|
|
run: |
|
|
python main.py "$FB_PAGE" --pages 2 --output "$FB_PAGE.xml"
|
|
|
|
- name: Commit and Push changes
|
|
run: |
|
|
git config --global user.name 'gitea-actions[bot]'
|
|
git config --global user.email 'gitea-actions[bot]@users.noreply.gitea.com'
|
|
git add *.xml
|
|
git commit -m "Update RSS feed(s)" || exit 0
|
|
git push
|