twitter-dev-bot-post #11824
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: twitter-dev-bot-post | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '15 * * * *' | |
jobs: | |
twitter-dev-bot-post: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install curl | |
run: | | |
sudo apt-get update | |
sudo apt-get install libcurl4-openssl-dev | |
- uses: r-lib/actions/setup-r@v2 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
with: | |
pandoc-version: '2.19.2' | |
- uses: r-lib/actions/setup-renv@v2 | |
with: | |
cache-version: 2 | |
- name: Scrape, format and post | |
env: | |
TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }} | |
TWITTER_API_SECRET: ${{ secrets.TWITTER_API_SECRET }} | |
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }} | |
TWITTER_ACCESS_SECRET: ${{ secrets.TWITTER_ACCESS_SECRET }} | |
TWITTER_CLIENT_ID: ${{ secrets.TWITTER_CLIENT_ID }} | |
TWITTER_CLIENT_SECRET: ${{ secrets.TWITTER_CLIENT_SECRET }} | |
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }} | |
run: Rscript run.R | |
- uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions | |
message: 'Refresh NEWS files' |