Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/wiki
Submodule wiki updated from aef19f to 27c2a1
17 changes: 11 additions & 6 deletions .github/workflows/wiki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,12 @@ jobs:
push: true

publish:
name: Publish Wiki Main
name: Publish Wiki Master
if: github.event_name == 'pull_request_target' && github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'
runs-on: ubuntu-latest

env:
WIKI_PUBLISH_BRANCH: master
WIKI_PREVIEW_BRANCH: pr-${{ github.event.pull_request.number }}

steps:
Expand All @@ -133,19 +134,23 @@ jobs:
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git config --global --add safe.directory "$GITHUB_WORKSPACE/.github/wiki"

- name: Prepare wiki main branch from preview branch
- name: Prepare wiki publish branch from preview branch
working-directory: .github/wiki
run: |
git fetch origin main "${WIKI_PREVIEW_BRANCH}"
git switch -C main --track origin/main || git switch main
git fetch origin "${WIKI_PUBLISH_BRANCH}" "${WIKI_PREVIEW_BRANCH}"
git switch -C "${WIKI_PUBLISH_BRANCH}" --track "origin/${WIKI_PUBLISH_BRANCH}" || git switch "${WIKI_PUBLISH_BRANCH}"
git reset --hard "origin/${WIKI_PREVIEW_BRANCH}"
git clean -fd

- name: Commit & push wiki main branch
- name: Commit & push wiki publish branch
Comment thread
coisa marked this conversation as resolved.
Dismissed
uses: EndBug/add-and-commit@v10
with:
cwd: .github/wiki
add: .
message: "Publish wiki docs from PR #${{ github.event.pull_request.number }}"
default_author: github_actions
push: origin HEAD:main
push: origin HEAD:${{ env.WIKI_PUBLISH_BRANCH }}

- name: Delete wiki preview branch
working-directory: .github/wiki
run: git push origin --delete "${WIKI_PREVIEW_BRANCH}"
Loading