diff --git a/.github/workflows/docker-run.yml b/.github/workflows/docker-run.yml index 3b34ee8..13eff0b 100644 --- a/.github/workflows/docker-run.yml +++ b/.github/workflows/docker-run.yml @@ -18,8 +18,7 @@ jobs: # pass or create environment variables environment: | NOTION_SPACE_ID=${{ secrets.NOTION_SPACE_ID }} - NOTION_EMAIL=${{ secrets.NOTION_EMAIL }} - NOTION_PASSWORD=${{ secrets.NOTION_PASSWORD }} + NOTION_TOKEN_V2=${{ secrets.NOTION_TOKEN_V2 }} GOOGLE_DRIVE_ROOT_FOLDER_ID=${{ secrets.GOOGLE_DRIVE_ROOT_FOLDER_ID }} GOOGLE_DRIVE_SERVICE_ACCOUNT=${{ secrets.GOOGLE_DRIVE_SERVICE_ACCOUNT }} diff --git a/src/main/java/com/greydev/notionbackup/NotionBackup.java b/src/main/java/com/greydev/notionbackup/NotionBackup.java index 842f105..0f7e651 100644 --- a/src/main/java/com/greydev/notionbackup/NotionBackup.java +++ b/src/main/java/com/greydev/notionbackup/NotionBackup.java @@ -73,28 +73,32 @@ public static void main(String[] args) { CompletableFuture futureGoogleDrive = CompletableFuture .runAsync(() -> NotionBackup.startGoogleDriveBackup(exportedFile)) .handle((result, ex) -> { - if (ex != null) hasErrorOccurred.set(true); + if (ex != null) { hasErrorOccurred.set(true); } + log.error("Exception while GoogleDrive upload", ex); return null; }); CompletableFuture futureDropbox = CompletableFuture .runAsync(() -> NotionBackup.startDropboxBackup(exportedFile)) .handle((result, ex) -> { - if (ex != null) hasErrorOccurred.set(true); + if (ex != null) { hasErrorOccurred.set(true); } + log.error("Exception while Dropbox upload", ex); return null; }); CompletableFuture futureNextcloud = CompletableFuture .runAsync(() -> NotionBackup.startNextcloudBackup(exportedFile)) .handle((result, ex) -> { - if (ex != null) hasErrorOccurred.set(true); + if (ex != null) { hasErrorOccurred.set(true); } + log.error("Exception while Nextcloud upload", ex); return null; }); CompletableFuture futurePCloud = CompletableFuture .runAsync(() -> NotionBackup.startPCloudBackup(exportedFile)) .handle((result, ex) -> { - if (ex != null) hasErrorOccurred.set(true); + if (ex != null) { hasErrorOccurred.set(true); } + log.error("Exception while Pcloud upload", ex); return null; });