Skip to content

computer - update #3357

computer - update

computer - update #3357

name: computer - update
on:
workflow_dispatch:
schedule:
- cron: "0 * * * *"
jobs:
update:
name: Update
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
working-directory: sites/computer.mads-hartmann.com
run: npm ci
- name: Run script
env:
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
working-directory: sites/computer.mads-hartmann.com
run: node scripts/update-from-notion.js > src/pages/index.md
- name: Commit changes
run: |
if [[ -z $(git status -s) ]]; then
echo "No changes to commit"
exit 0
fi
git config user.name github-actions
git config user.email [email protected]
git commit -am "Updated from Notion"
git push