From 90e2dcfa1043d98478c882be8a28cc109ce47900 Mon Sep 17 00:00:00 2001
From: supremestdoggo <83146042+supremestdoggo@users.noreply.github.com>
Date: Tue, 6 Jul 2021 10:02:28 -0400
Subject: [PATCH] Added twitter feed workflow
---
.github/workflows/twitter.yml | 32 +++++++++++++++++++++++++++++
data-science-notes/twitterfeed.html | 1 +
data-science-notes/twitterfeed.py | 3 +++
3 files changed, 36 insertions(+)
create mode 100644 .github/workflows/twitter.yml
create mode 100644 data-science-notes/twitterfeed.html
create mode 100644 data-science-notes/twitterfeed.py
diff --git a/.github/workflows/twitter.yml b/.github/workflows/twitter.yml
new file mode 100644
index 00000000..00975f83
--- /dev/null
+++ b/.github/workflows/twitter.yml
@@ -0,0 +1,32 @@
+name: update-twitter-feed
+
+
+on:
+ schedule:
+ - cron: '0 * * * *'
+
+
+jobs:
+ update-feed:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@master
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: '3.9'
+ - name: Install dependency
+ run: python -m pip install imgkit
+ - name: Change directory
+ run: cd data-science-notes
+ - name: Update feed
+ run: python ./data-science-notes/twitterfeed.py
+ - name: Setup git config
+ run: |
+ git config user.name "Twitter Action"
+ git config user.email "<>"
+ - name: Commit
+ run: |
+ git add feed.jpg
+ git commit -m "Updated Twitter feed"
+ git push origin master
\ No newline at end of file
diff --git a/data-science-notes/twitterfeed.html b/data-science-notes/twitterfeed.html
new file mode 100644
index 00000000..6c24bb14
--- /dev/null
+++ b/data-science-notes/twitterfeed.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/data-science-notes/twitterfeed.py b/data-science-notes/twitterfeed.py
new file mode 100644
index 00000000..11a100ef
--- /dev/null
+++ b/data-science-notes/twitterfeed.py
@@ -0,0 +1,3 @@
+import imgkit
+
+imgkit.from_file('twitterfeed.html', 'feed.jpg')
\ No newline at end of file