berasBOTpublish #9573
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: berasBOTpublish | |
on: | |
schedule: | |
- cron: '15 0/2 * * *' # once every two hour at 15th minute | |
jobs: | |
pangan-post: | |
runs-on: macOS-latest | |
env: | |
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }} | |
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }} | |
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} | |
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
- name: Install rtweet package | |
run: Rscript -e 'install.packages("rtweet", dependencies = TRUE)' | |
- name: Install rvest package | |
run: Rscript -e 'install.packages("rvest", dependencies = TRUE)' | |
- name: Install ggplot2 package | |
run: Rscript -e 'install.packages("ggplot2", dependencies = TRUE)' | |
- name: Install dplyr package | |
run: Rscript -e 'install.packages("dplyr", dependencies = TRUE)' | |
- name: Install tidyr package | |
run: Rscript -e 'install.packages("tidyr", dependencies = TRUE)' | |
- name: Create and post tweet | |
run: Rscript beras-tweet.R |