Skip to content

Commit b55ab3f

Browse files
author
dalj8690
committed
Updated the job for generating the RSS Feeds
1 parent 2f40b10 commit b55ab3f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/rss-generator.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14+
# Step 1: Checkout the repository
1415
- name: Checkout repo
1516
uses: actions/checkout@v4
1617

17-
- name: Check out files
18+
# Step 2: Wait for a short time to ensure the PDF has been fully committed
19+
- name: Wait for file to be committed
1820
run: |
19-
ls -al docs/
20-
cat docs/rss.xml # Print the contents of rss.xml before script runs
21-
21+
echo "Waiting for the PDF to be fully committed..."
22+
sleep 10 # Wait for 10 seconds to ensure the push has been reflected in the repo
23+
24+
# Step 3: Generate the RSS feed with the updated PDF
2225
- name: Set up Python 3
2326
uses: actions/setup-python@v5
2427
with:
@@ -27,15 +30,12 @@ jobs:
2730
- name: Generate RSS feed from PDFs
2831
run: |
2932
python generate_rss.py
30-
31-
- name: Check if rss.xml is modified
32-
run: |
33-
git diff docs/rss.xml # Show if the file has changed
34-
33+
34+
# Step 4: Commit and push the updated RSS feed
3535
- name: Commit and push updated rss.xml
3636
run: |
3737
git config user.name "github-actions[bot]"
3838
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
3939
git add docs/rss.xml
40-
git commit -m "Update RSS feed with new article" || echo "No changes to commit"
40+
git commit -m "Update RSS feed with new (modified) article" || echo "No changes to commit"
4141
git push

0 commit comments

Comments
 (0)