Send Email (cron) #625
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: Send Email (cron) | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 22 * * *" | |
jobs: | |
send_email: | |
name: "Send Newsletter Email" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup timezone | |
uses: zcong1993/setup-timezone@master | |
with: | |
timezone: Asia/Seoul | |
- name: Checkout Branch | |
uses: actions/checkout@v2 | |
with: | |
ssh-key: ${{secrets.SCRIPT_DEPLOY_PRIVATE}} | |
ssh-known-hosts: ${{secrets.SSH_KNOWN_HOSTS}} | |
submodules: true | |
- name: Install NodeJS | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "16" | |
- name: Install Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.x" | |
- name: Install Python dependencies | |
run: pip install -r requirements.txt | |
- name: Run Python Script | |
run: python sendmail.py | |
env: | |
SMTP_HOST: ${{secrets.SMTP_HOST}} | |
SMTP_PORT: ${{secrets.SMTP_PORT}} | |
SMTP_ID: ${{secrets.SMTP_ID}} | |
SMTP_PW: ${{secrets.SMTP_PW}} | |
EMAIL_SENDER_NAME: Handong Newsletter | |
EMAIL_SENDER_EMAIL: ${{secrets.EMAIL_SENDER_EMAIL}} | |
HISNET_ID: ${{secrets.HISNET_ID}} | |
HISNET_PW: ${{secrets.HISNET_PW}} | |
FIREBASE_CONFIG: ${{secrets.FIREBASE_CONFIG}} |