Run Node.js Program #180
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: Run Node.js Program | |
on: | |
schedule: | |
- cron: '0 11 * * *' | |
jobs: | |
run-script: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: npm install | |
- name: Run the script | |
run: node index.js | |
env: | |
MY_EMAIL: ${{ secrets.MY_EMAIL }} | |
MY_PASSWORD: ${{ secrets.MY_PASSWORD }} | |
EMAIL_TO: ${{ secrets.EMAIL_TO }} | |
MESSAGE_HEADING: ${{ secrets.MESSAGE_HEADING }} | |
MESSAGE_BODY: ${{ secrets.MESSAGE_BODY }} | |
SEARCH_TERM: ${{ secrets.SEARCH_TERM }} | |