-
Notifications
You must be signed in to change notification settings - Fork 11
41 lines (37 loc) · 1.11 KB
/
debe-to-kindle.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
name: debe-to-kindle
on:
schedule:
- cron: "1 5 * * *"
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
jobs:
debe-to-kindle:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install requirements
run: pip install -r requirements.txt
- name: Run debe-to-kindle
run: python main.py
- name: create env var for date
run: |
echo "DATE=$(python -c 'from datetime import date; print(date.today())')" >> $GITHUB_ENV
- name: Send mail
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{secrets.MAIL_NAME}}
password: ${{secrets.MAIL_PASSWORD}}
subject: debe - ${{env.DATE}}
to: ${{secrets.KINDLE_MAIL}}
from: ${{secrets.MAIL_NAME}}
ignore_cert: true
secure: true
html_body: README.md
attachments: Eksisozluk DEBE - ${{env.DATE}}.html