MatthieuBizien / roam-to-git

Automatic RoamResearch backup to Git
MIT License
550 stars 133 forks source link

Github Workflow backup does not start an action #37

Closed IanQS closed 4 years ago

IanQS commented 4 years ago

Describe the bug

I've followed all the instructions but when I push the repo I do not see anything being run in the "Actions" tab.

To Reproduce

1) Create a new private repo 2) Add secrets like in the env.template (but obviously I changed it to my credentials) 3) Add the github action 4) Check that the github action works

Expected behavior Backup action to run

Traceback

Please complete the following information:

Additional context Add any other context about the problem here.


My directory structure looks like this

my_dir/
  | .github/
    | workflows/
      | main.yml
  | .git

where my main.yml contains

name: "Roam Research backup"

on:
  push:
    branches:
      - master
  schedule:
    -   cron: "0 * * * *"

jobs:
  backup:
    runs-on: ubuntu-latest
    name: Backup
    timeout-minutes: 15
    steps:
      -   uses: actions/checkout@v2
      -   name: Set up Python 3.8
          uses: actions/setup-python@v1
          with:
            python-version: 3.8

      -   name: Setup dependencies
          run: |
            pip install git+https://github.com/MatthieuBizien/roam-to-git.git
      -   name: Run backup
          run: roam-to-git --skip-git .
          env:
            ROAMRESEARCH_USER: ${{ secrets.ROAMRESEARCH_USER }}
            ROAMRESEARCH_PASSWORD: ${{ secrets.ROAMRESEARCH_PASSWORD }}
            ROAMRESEARCH_DATABASE: ${{ secrets.ROAMRESEARCH_DATABASE }}

      -   name: Commit changes
          uses: elstudio/actions-js-build/commit@v3
          with:
            commitMessage: Automated snapshot
IanQS commented 4 years ago

Perhaps I don't understand the workflow... In theory after I push my action it should start and automatically back up for me constantly, right? Or do I need to do some manual stuff in between?

IanQS commented 4 years ago

NVM, after I pushed it again with the .env file in the main dir it starts up the action