Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Notion backup

Notion backup #77

Workflow file for this run

name: "Notion backup"
on:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: "27 5 * * *"
jobs:
backup:
runs-on: ubuntu-latest
name: Backup
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: "18"
- name: Setup dependencies
run: npm install -g notion-backup
- name: Cleanup
run: bash .ci/cleanup.bash
- name: Run dump
run: notion-backup
env:
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
NOTION_FILE_TOKEN: ${{ secrets.NOTION_FILE_TOKEN }}
NOTION_SPACE_ID: ${{ secrets.NOTION_SPACE_ID }}
NODE_OPTIONS: "--max-http-header-size 15000"
- name: Restructure
run: bash .ci/restruct.bash
- name: Commit changes
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add .
git commit -m "Automated dump" \
&& git push \
|| echo "Nothing to commit."