mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-11 16:26:22 +00:00
29 lines
855 B
YAML
29 lines
855 B
YAML
name: Publish wiki
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
paths:
|
|
- docs/**
|
|
- .github/workflows/sync-wiki.yml
|
|
workflow_dispatch:
|
|
concurrency:
|
|
group: publish-wiki
|
|
cancel-in-progress: true
|
|
permissions:
|
|
contents: write
|
|
jobs:
|
|
publish-wiki:
|
|
if: github.repository_owner == 'Card-Forge'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: fix md links for Gollum
|
|
run: find ${{ github.workspace }}/docs/ -type f -name "*.md" -exec sed -i -E 's|(\[[^]]+]\()([^)]+\/)*([^).]+).md\)|\1\3)|g' '{}' \;
|
|
- name: fix image links for Gollum
|
|
run: find ${{ github.workspace }}/docs/ -type f -name "*.png" -exec mv '{}' ${{ github.workspace }}/docs/ \;
|
|
- uses: Andrew-Chen-Wang/github-wiki-action@v5
|
|
with:
|
|
path: docs
|
|
preprocess: false
|
|
strategy: init
|