Launch an R script using github actions
Last updated
Was this helpful?
Last updated
Was this helpful?
The easiest way to do that is to duplicate this repository on GitHub
Just push the "Fork" button to create your copy.
Let me explain how it works. It's basically all about two files:
this is the classic R script. It reaches this website XML sitemap and counts the number of url submitted. It relies on rvest
package ( see article about rvest )
This is where we are going to schedule the process.
Parts you may want to modify are
the execution frequency rule. It's the weird line with cron.
this one means " Runs at 13:00 UTC every day." here is the full syntax documentation.
If you are using packages, you need to ask Github to install them before running the script so be sure to include those on the list.
the resulting CSV is updated every day and can be scrape
RAW LINK: https://raw.githubusercontent.com/pixgarden/scrape-automation/main/data/xml_url_count.csv