news letter cron #613
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: 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 "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git pull origin master | |
git add . | |
git commit -m ":card_file_box: DB 업데이트!" || exit 0 | |
git push |