Skip to content

Free automated Outline backups through GitHub Actions

License

Notifications You must be signed in to change notification settings

zensharp/outline-mirror-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

Outline Mirror Runner

Outline Mirror uses the Outline API and GitHub Actions to create free, fully version controlled snapshots of your Outline wiki at scheduled intervals.

Configuration

Runner Repository Setup

Tip

If you already have a Runner repository, you can skip this section.

  1. Create a "Runner" repository from this template. If you plan on using environments (recommended), make this repository public.

  2. In the Runner repository Settings > Actions > General, enable "Read and write permissions".

Important

If this option is not available, you may need to enable it at the Organization level.

Output Repository Setup

  1. Create a "Output" repository which will contain the snapshots. It is recommended that the Output repository is private since this is where your snapshots are stored.
  2. Use ssh-keygen to generate a key pair. Then, copy the contents of the public key (id_ed25519.pub).
ssh-keygen -t ed25519 -f ./id_ed25519
  1. In the Output repository, go to Settings > Security > Deploy keys and "Add deploy key". Paste your public key, then enable "Allow write access".

  2. In the Runner repository, create a new environment under Settings > Actions > General. Add the following environment secrets:

Name Description Example
OUTLINE_INSTANCE_URL URL of your outline instance https://getoutline.com
OUTLINE_API_KEY An API key generated from your outline instance ol_api_123456
OUTPUT_REPO_URL The SSH url of the Output repository. [email protected]:owner/mywiki-mirror
OUTPUT_SSH_KEY The private key (id_ed25519) generated earlier. ***
  1. In the Runner repository, add the newly created environment to jobs.deploy_snapshots.strategy.matrix.ENVIRONMENT.

Usage

Now, wait for the Runner repository to trigger the workflow (default is every 4 hours). You can also manually trigger the workflow from the Actions tab.

With each run, the workflow will generate a snapshot of your Outline wiki and push it to your Output repository's main branch.

You will also find JSON snapshots on the json branch in the Output repository.

About

Free automated Outline backups through GitHub Actions

Resources

License

Stars

Watchers

Forks