Last active
February 3, 2021 14:50
-
-
Save jonathanvoelkle/65295fd1f57029fdfc7e2ae781e7826f to your computer and use it in GitHub Desktop.
roam-backup
This file contains hidden or 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: "Roam Research EDN backup" | |
on: | |
schedule: | |
- cron: "0 4 * * *" | |
jobs: | |
backup: | |
runs-on: macos-latest | |
name: Backup | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python 3.8 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Setup Dependencies | |
run: | | |
brew install borkdude/brew/jet | |
pip install git+https://github.com/adithyabsk/roam-to-git.git@master | |
- name: Run backup | |
run: | | |
roam-to-git --skip-git -f edn -- . | |
env: | |
ROAMRESEARCH_USER: ${{ secrets.ROAMRESEARCH_USER }} | |
ROAMRESEARCH_PASSWORD: ${{ secrets.ROAMRESEARCH_PASSWORD }} | |
ROAMRESEARCH_DATABASE: ${{ secrets.ROAMRESEARCH_DATABASE }} | |
- name: Commit Changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Automated snapshot ${{ github.run_number }} |
This file contains hidden or 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: "Roam Research backup" | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: "20 * * * *" | |
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 ${{ github.run_number }} |
Hi @tombarys, here are some instructions on how to set it up generally https://github.com/MatthieuBizien/roam-to-git
and here are the instructions on how to use it with GitHub actions https://eriknewhard.com/blog/backup-roam-in-github (what I would recommend)
Hope this helps; I don't know how to set it up specifically on MacOS, sorry. You might want to ask on the roam-slack.
Thank you very much!
Tomáš
…On January 31, 2021, "Tomáš Baránek" ***@***.***> wrote:
@jonathanvoelkle commented on this gist.
Hi @tombarys <https://github.com/tombarys>, here are some instructions
on how to set it up generally <https://github.com/MatthieuBizien/roam-
to-git>
and here are the instructions on how to use it with GitHub actions
<https://eriknewhard.com/blog/backup-roam-in-github> (what I would
recommend)
Hope this helps; I don't know how to set it up specifically on MacOS,
sorry. You might want to ask on the roam-slack.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://gist.github.com/65295fd1f57029fdfc7e2ae781e7826f#gistcomment-
3614763>, or unsubscribe
<https://github.com/notifications/unsubscribe-
auth/ABLWYSBNLM63AIYHPQBYCO3S4W7H3ANCNFSM4W3UAVPA>.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, Jonathan, could you give me some simple instructions on how to use this script on my MacOS? I am lost. Thank you! Tomáš