Outline Mirror uses the Outline API and GitHub Actions to create free, fully version controlled snapshots of your Outline wiki at scheduled intervals.
Tip
If you already have a Runner repository, you can skip this section.
-
Create a "Runner" repository from this template. If you plan on using environments (recommended), make this repository public.
-
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.
- 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.
- 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
-
In the Output repository, go to Settings > Security > Deploy keys and "Add deploy key". Paste your public key, then enable "Allow write access".
-
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. |
*** |
- In the Runner repository, add the newly created environment to
jobs.deploy_snapshots.strategy.matrix.ENVIRONMENT
.
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.