-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (38 loc) · 1.11 KB
/
update-rss.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# This workflow updates the RSS feeds
name: Update RSS feeds
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '*/60 */3 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# allow the job to commit to the repository
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Update the feeds
env:
FB_TOKEN: ${{ secrets.FB_TOKEN }}
run: |
set -x
python main.py
python instagram.py
# https://github.com/marketplace/actions/git-auto-commit
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
ref: ${{ github.head_ref }}
commit_message: RSS feed updated
file_pattern: './docs/*.xml'