Files
Suwayomi-Server/.github/workflows/wiki.yml
Constantin Piber c68a108298 Add Flaresolverr info to troubleshooting (#2077)
* Add Flaresolverr info to troubleshooting

* Wiki: Embed permalink to stable configuration page
2026-05-31 17:05:23 -04:00

50 lines
1.7 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: GitHub Wiki upload
on:
workflow_dispatch:
push:
branches:
- master
paths: [docs/**, .github/workflows/wiki.yml]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
wiki:
name: Publish to GitHub Wiki
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v6
with:
repository: ${{github.repository}}
path: ${{github.repository}}
- name: Checkout Wiki
uses: actions/checkout@v6
with:
repository: ${{github.repository}}.wiki
path: ${{github.repository}}.wiki
- name: Push to wiki
run: |
set -e
cd $GITHUB_WORKSPACE/${{github.repository}}.wiki
cp -r $GITHUB_WORKSPACE/${{github.repository}}/docs/* .
stable="$(git describe --abbrev=0 --tags)"
if ! git -C $GITHUB_WORKSPACE/${{github.repository}} log --exit-code --pretty= "$stable.." -- docs/Configuring-SuwayomiServer.md; then
echo "Changes to config detected, embedding link to stable"
sed -i '1s/^/> [!WARNING]\n> This document describes the settings available in the preview version. Please head to ['$stable'](https:\/\/github.com\/Suwayomi\/Suwayomi-Server\/blob\/'$stable'\/docs\/Configuring-Suwayomi%E2%80%90Server.md) for the current stable version\n\n/' Configuring-SuwayomiServer.md
fi
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git diff-index --quiet HEAD || git commit -m "action: wiki sync" && git push