Notion to Jekyll #188
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: Notion to Jekyll | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "16" | |
- name: Install dependencies | |
run: npm install | |
- name: Run Notion to Jekyll script | |
env: | |
NOTION_KEY: ${{ secrets.NOTION_KEY }} | |
NOTION_DB_ID: ${{ secrets.NOTION_DB_ID }} | |
run: node notion-to-blog/schedule-script.js | |
- name: Commit and push changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "KKardd" | |
git add . | |
git commit -m "Add new posts from Notion" || echo "No changes to commit" | |
git push || echo "Nothing to push" |