Skip to content

Generate quote by schedule #17

Generate quote by schedule

Generate quote by schedule #17

Workflow file for this run

name: Generate quote by schedule
on:
schedule:
- cron: "0 5 * * 3" # At 05:00 on Thursday. (utc)
jobs:
try_schedule:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up NodeJS
uses: actions/setup-node@v3
with:
node-version: 20
cache: "npm"
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm i
- name: Generate Quote
run: npm run generate:quote
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
author_name: "[BOT] Dede Adhyatika"
author_email: [email protected]
message: "chore(Quote): New quote generated"