Skip to content

Today notification #140

Today notification

Today notification #140

name: Today notification
on:
schedule:
- cron: '30 6 * * *'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: 'cron'
cancel-in-progress: true
jobs:
cron:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Node.js setup
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run
run: npm run today-notification
env:
API_KEY: ${{ secrets.API_KEY }}
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
SPREADSHEET_ID: ${{ secrets.SPREADSHEET_ID }}
SMTP_HOST: ${{ vars.SMTP_HOST }}
SMTP_PORT: ${{ vars.SMTP_PORT }}
SMTP_USER: ${{ vars.SMTP_USER }}
SMTP_PASSWORD: ${{ secrets.SMTP_PASSWORD }}
WEEKLY_SUMMARY_EMAIL_RECIPIENTS: ${{ vars.WEEKLY_SUMMARY_EMAIL_RECIPIENTS }}
APIFLASH_ACCESS_KEY: ${{ secrets.APIFLASH_ACCESS_KEY }}
COURSE_NAME: ${{ vars.COURSE_NAME }}
COURSE_REGION: ${{ vars.COURSE_REGION }}
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'website'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1