Skip to content

Get Wiki contents from Joplin #15

Get Wiki contents from Joplin

Get Wiki contents from Joplin #15

Workflow file for this run

name: Get Wiki contents from Joplin
on:
push:
branches: [ "master" ]
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: write
id-token: write
concurrency:
group: "joplin"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Login and sync Joplin Wiki notebook
env:
JOPLIN_PATH: ${{ secrets.JOPLIN_PATH }}
JOPLIN_USER: ${{ secrets.JOPLIN_USER }}
JOPLIN_PASSWORD: ${{ secrets.JOPLIN_PASSWORD }}
run: |
npx joplin config sync.target 9
npx joplin config sync.9.path "$JOPLIN_PATH"
npx joplin config sync.9.username "$JOPLIN_USER"
npx joplin config sync.9.password "$JOPLIN_PASSWORD"
npx joplin sync
rm -rf src/
npx joplin export --format md --notebook Wiki src/
- name: Build mdbook summary
run: ./generate_summary.py
- uses: EndBug/add-and-commit@v9 # You can change this to use a specific version.
with:
add: 'src'
default_author: github_actions
message: 'Sync wiki contents with upstream'
pathspec_error_handling: exitImmediately