Skip to content

Screened Passengers #770

Screened Passengers

Screened Passengers #770

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
#
# See https://github.com/r-lib/actions/tree/master/examples#readme for
# additional example workflows available for the R community.
# Hourly scraping
name: Screened Passengers
on:
schedule:
- cron: "0 3 * * *" # every day at 3 am
#on:
# push:
# branches: [main, master]
# pull_request:
# branches: [main, master]
jobs:
autoscrape:
# The type of runner that the job will run on
runs-on: macos-latest
# Load repo and install R
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-r@v2
# Set-up R
- name: Install packages
run: |
R -e 'install.packages(c("rvest", "dplyr", "tidyr","janitor", "lubridate"))'
# Run R script
- name: Screened Passengers
run: Rscript Screened_Passengers.R
# Add new files in data folder, commit along with other modified files, push
- name: Commit files
run: |
git config --local user.name github-actions
git config --local user.email "actions@github.com"
git add Data/*
git commit -am "GH ACTION Autorun $(date)"
git push origin main
env:
REPO_KEY: ${{secrets.GITHUB_TOKEN}}
username: github-actions