From 748aa6c9bbad419f0a2fc6e8ed8551a939526551 Mon Sep 17 00:00:00 2001 From: Pavel Zhovner Date: Tue, 15 Sep 2020 12:26:24 +0300 Subject: [PATCH] Rewrite images path to obsolute in wiki repo --- .github/deploy_wiki.sh | 6 ++++++ .github/workflows/publish_wiki.yml | 2 ++ 2 files changed, 8 insertions(+) diff --git a/.github/deploy_wiki.sh b/.github/deploy_wiki.sh index 914236f1a..2bc606bd1 100755 --- a/.github/deploy_wiki.sh +++ b/.github/deploy_wiki.sh @@ -63,6 +63,12 @@ if [ ! -r "$tmp_dir/Home.md" ]; then rsync -q -a "$GITHUB_WORKSPACE/README.md" "$tmp_dir/Home.md" fi +debug "Rewriting images path to absolute" +( + cd "$tmp_dir" || exit 1 + find . -type f -exec sed -Ei 's@([ (])([^( ]+)(\/wiki_static\/.+?\.(png|jpe?g|svg)[ \)])@\1https://github.com/Flipper-Zero/flipperzero-firmware-community/raw/master\3@' {} \; +) + debug "Committing and pushing changes" ( cd "$tmp_dir" || exit 1 diff --git a/.github/workflows/publish_wiki.yml b/.github/workflows/publish_wiki.yml index ddd2af9ea..f243476eb 100644 --- a/.github/workflows/publish_wiki.yml +++ b/.github/workflows/publish_wiki.yml @@ -4,6 +4,8 @@ name: Publish the wiki on: push: branches: [ master ] + paths: + - "wiki" jobs: