feat(ses): add SES light novel pipeline; extract shared lib/wiki.py
New pipeline at pipelines/ses/ publishes mikkeli/ses-light-novel to the SES: MediaWiki namespace. All pages get Category:SES and Category:SES:<type> (type from frontmatter, fallback to parent dir name). Shared functions (connect_wiki, markdown_to_wikitext, strip_first_h1, AUTO_BANNER_PREFIX) extracted from songs/publish.py into lib/wiki.py; songs refactored to import from there. Also adds publish-ses.yml workflow stub and updates Dockerfile and root README. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
SOURCE_REF:
|
||||
description: "Commit SHA that was pushed to ses-light-novel"
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: novoyuuparosk-wiki-runner:latest
|
||||
|
||||
steps:
|
||||
- name: Checkout ses-light-novel
|
||||
env:
|
||||
FAPAT: ${{ secrets.FAPAT }}
|
||||
URL_TO_GITEA: ${{ vars.URL_TO_GITEA }}
|
||||
run: |
|
||||
git clone "http://mikkeli:${FAPAT}@${URL_TO_GITEA#http://}/mikkeli/ses-light-novel" ses-light-novel
|
||||
git -C ses-light-novel checkout ${{ inputs.SOURCE_REF }}
|
||||
|
||||
- name: Checkout auto-wiki
|
||||
env:
|
||||
FAPAT: ${{ secrets.FAPAT }}
|
||||
URL_TO_GITEA: ${{ vars.URL_TO_GITEA }}
|
||||
run: git clone "http://mikkeli:${FAPAT}@${URL_TO_GITEA#http://}/mikkeli/novoyuuparosk-auto-wiki" auto-wiki
|
||||
|
||||
- name: Publish
|
||||
env:
|
||||
WIKI_API_URL: ${{ vars.WIKI_API_URL }}
|
||||
WIKI_BASE_URL: ${{ vars.WIKI_BASE_URL }}
|
||||
WIKI_BOT_USER: ${{ secrets.WIKI_BOT_USER }}
|
||||
WIKI_BOT_PASSWORD: ${{ secrets.WIKI_BOT_PASSWORD }}
|
||||
SOURCE_REF: ${{ inputs.SOURCE_REF }}
|
||||
GITEA_REPO_URL: ${{ vars.URL_TO_GITEA }}/mikkeli/ses-light-novel
|
||||
run: |
|
||||
python auto-wiki/pipelines/ses/publish.py \
|
||||
--source-dir ses-light-novel \
|
||||
--all
|
||||
Reference in New Issue
Block a user