Send vocabularies by scheduled times #37
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 vocabularies by scheduled times | |
on: | |
schedule: | |
- cron: "0 3 * * THU" # Runs at 10:00 GMT+7, only on Thursday | |
- cron: "30 3 * * SUN" # Runs at 10:30 GMT+7, only on Sunday | |
workflow_dispatch: | |
jobs: | |
run-the-job: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: "npm" | |
- name: setup dependencies | |
run: npm install | |
- name: sending email | |
env: | |
SENDING_EMAIL: ${{ secrets.SENDING_EMAIL }} | |
SENDING_PASSWORD: ${{ secrets.SENDING_PASSWORD }} | |
DESTINATION_EMAIL: ${{ secrets.DESTINATION_EMAIL }} | |
NOTION_DB_ID: ${{ secrets.NOTION_DB_ID }} | |
NOTION_API_KEY: ${{ secrets.NOTION_API_KEY }} | |
run: npm start |