Skip to content

news letter cron

news letter cron #40

Workflow file for this run

name: news letter cron
on:
workflow_dispatch:
schedule:
- cron: "0 */6 * * *"
jobs:
cron:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Create .env file
run: echo "${{ secrets.DOTENV }}" > .env
- name: Run Newsletter
run: |
npm install
npm run prod
- name: Push File Changes
run: |
git config --global user.name "baekteun"
git config --global user.email "[email protected]"
git pull origin master
git add .
git commit -m ":card_file_box: DB 업데이트!" || exit 0
git push