Skip to content

Try 03

Try 03 #446

Workflow file for this run

name: scrape_data
on:
push:
branches:
- main
# schedule:
# - cron: '30 6,12 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- shell: bash
env:
LINKEDIN_ACCESS_TOKEN: ${{ secrets.LINKEDIN_ACCESS_TOKEN }}
LINKEDIN_URN: ${{ secrets.LINKEDIN_URN }}
TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}
TWITTER_API_KEY_SECRET: ${{ secrets.TWITTER_API_KEY_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_USER_ID: ${{ secrets.TWITTER_USER_ID }}
TWITTER_USERNAME: ${{ secrets.TWITTER_USERNAME }}
run: |
echo LINKEDIN_ACCESS_TOKEN="$LINKEDIN_ACCESS_TOKEN" >> .env
echo LINKEDIN_URN="$LINKEDIN_URN" >> .env
echo TWITTER_API_KEY="$TWITTER_API_KEY" >> .env
echo TWITTER_API_KEY_SECRET="$TWITTER_API_KEY_SECRET" >> .env
echo TWITTER_ACCESS_TOKEN="$TWITTER_ACCESS_TOKEN" >> .env
echo TWITTER_USER_ID="$TWITTER_USER_ID" >> .env
echo TWITTER_USERNAME="$TWITTER_USERNAME" >> .env
- name: Install Google Chorme Driver
run: |
sudo apt install xdg-utils wget fonts-liberation -y
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg --install google-chrome-stable_current_amd64.deb
rm -rf google-chrome-stable_current_amd64.deb
which google-chrome
- name: Set up Python3
uses: actions/setup-python@v2
with:
python-version: '3.8.*'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Publish tweets to Linkedin
run: |
python publish.py
- uses: EndBug/add-and-commit@v8
with:
add: 'db.txt'
message: 'append to db'
push: true