Skip to content

Fix Publish Wiki workflow by using clone strategy with preprocess - #49

Merged
rijesha merged 3 commits into
mainfrom
copilot/fix-publish-wiki-job-failure
Nov 29, 2025
Merged

Fix Publish Wiki workflow by using clone strategy with preprocess#49
rijesha merged 3 commits into
mainfrom
copilot/fix-publish-wiki-job-failure

Conversation

Copilot AI commented Nov 29, 2025

Copy link
Copy Markdown
Contributor

The Publish Wiki workflow fails with fatal: this operation must be run in a work tree because github-wiki-action@v4's default clone strategy attempts to unset core.bare on a bare repository, which fails on newer git versions.

Changes

  • Use clone strategy with preprocess: true option in the wiki action
- name: Publish wiki
  uses: Andrew-Chen-Wang/github-wiki-action@v4
  with:
    path: docs
    strategy: clone
    preprocess: true

The clone strategy is safer and preserves wiki history. The preprocess: true option automatically maps README.md to the Wiki's Home page.

Original prompt

This section details on the original issue you should resolve

<issue_title>Publish wiki job is failing</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)

@rijesha @copilot this did not fix the problem

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@rijesha

rijesha commented Nov 29, 2025

Copy link
Copy Markdown
Contributor

@copilot Here is some smple code that might work:

name: Sync Docs to Wiki

on:
  push:
    branches:
      - main       # Change this if your default branch is 'master'
    paths:
      - 'docs/**'  # Only trigger when files in the docs folder change

jobs:
  update-wiki:
    runs-on: ubuntu-latest
    permissions:
      contents: write # Important: Required to allow pushing to the wiki

    steps:
      - name: Checkout Code
        uses: actions/checkout@v4

      - name: Sync Docs to Wiki
        uses: Andrew-Chen-Wang/github-wiki-action@v4
        with:
          # The folder in your repo that contains the documentation
          path: docs
          
          # Strategies: 'clone' (safer) or 'init' (force overwrite)
          strategy: clone
          
          # Map your README.md to the Wiki's Home page automatically
          preprocess: true

Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix publish wiki job failure issue Fix Publish Wiki workflow by using init strategy Nov 29, 2025
Copilot AI requested a review from rijesha November 29, 2025 19:04
Co-authored-by: rijesha <7819200+rijesha@users.noreply.github.com>

Copilot AI commented Nov 29, 2025

Copy link
Copy Markdown
Contributor Author

@copilot Here is some smple code that might work:

...

Updated the workflow to use strategy: clone with preprocess: true in commit fdc0bf4.

Copilot AI changed the title Fix Publish Wiki workflow by using init strategy Fix Publish Wiki workflow by using clone strategy with preprocess Nov 29, 2025
@rijesha
rijesha marked this pull request as ready for review November 29, 2025 20:39
@rijesha
rijesha merged commit 99bd87f into main Nov 29, 2025
2 checks passed
@rijesha
rijesha deleted the copilot/fix-publish-wiki-job-failure branch December 6, 2025 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish wiki job is failing

2 participants