Skip to content

Commit

Permalink
Alex/rss cron (#540)
Browse files Browse the repository at this point in the history
Create a cron job to pull, modify, and publish a rss feed file every
hour
  • Loading branch information
alex-bezek authored Dec 19, 2023
1 parent 7274769 commit c548763
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/write-rss.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Sync RSS Feed to S3 Buckets

on:
schedule:
- cron: '0 * * * *' # Runs at the start of every hour

jobs:
sync-rss-feed:
name: Sync RSS Feed
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Fetch and Modify RSS Feed
run: |
curl -s https://webflow.dev-ngrok.com/blog-post/rss.xml | sed 's/webflow.dev-ngrok.com/dev-ngrok.com/g' > dev-rss.xml
curl -s https://webflow.stage-ngrok.com/blog-post/rss.xml | sed 's/webflow.stage-ngrok.com/stage-ngrok.com/g' > stage-rss.xml
curl -s https://webflow.ngrok.com/blog-post/rss.xml | sed 's/webflow.ngrok.com/ngrok.com/g' > rss.xml
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2

- name: Sync to Dev S3 Bucket
run: aws s3 cp dev-rss.xml s3://docs-s3.dev-ngrok.com/docs/blog-post/rss.xml --acl public-read

- name: Sync to Stage S3 Bucket
run: aws s3 cp stage-rss.xml s3://docs-s3.stage-ngrok.com/docs/blog-post/rss.xml --acl public-read

- name: Sync to Prod S3 Bucket
run: aws s3 cp rss.xml s3://docs-s3.ngrok.com/docs/blog-post/rss.xml --acl public-read

1 comment on commit c548763

@vercel
Copy link

@vercel vercel bot commented on c548763 Dec 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

ngrok-docs – ./

ngrok-docs.vercel.app
ngrok-docs-git-main-ngrok-dev.vercel.app
ngrok-docs-ngrok-dev.vercel.app

Please sign in to comment.