-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.82 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Run Python Script and Push to Another Repo
on:
schedule:
- cron: "0 */8 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install Monaco Font
run: |
sudo mkdir -p /usr/share/fonts/truetype/custom
sudo cp fonts/Monaco.ttf /usr/share/fonts/truetype/custom
sudo fc-cache -f -v
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install Python dependencies
run: |
pip install -r requirements.txt
- name: Run script
run: python main.py
env:
LEETCODE_SESSION: ${{ secrets.LEETCODE_SESSION }}
LC_EMAIL: ${{ secrets.LC_EMAIL }}
LC_PASSWORD: ${{ secrets.LC_PASSWORD }}
APP_PASSWORD: ${{ secrets.APP_PASSWORD }}
EMAIL: ${{ secrets.EMAIL }}
PHONE_NUMBER: ${{ secrets.PHONE_NUMBER }}
- name: Checkout 'LeetCode-Points-Graph' repository
uses: actions/checkout@v2
with:
repository: adeshpande03/LeetCode-Points-Graph
token: ${{ secrets.README_PAT }}
path: "LeetCode-Points-Graph"
- name: Copy points_graph.png to 'LeetCode-Points-Graph' repository
run: |
cp points_graph_rounded_corners.png LeetCode-Points-Graph/
cp logs.log LeetCode-Points-Graph/
cp data.csv LeetCode-Points-Graph/
- name: Commit and push to 'LeetCode-Points-Graph' repository
run: |
cd LeetCode-Points-Graph
git config --global user.name 'Akhil Deshpande'
git config --global user.email '[email protected]'
git add .
git commit -m "Update points_graph_rounded_corners.png"
git push