JamesIves/github-pages-deploy-action

detected dubious ownership in repository at '****/github-pages-deploy-action-temp-deployment-folder'

BMayhew opened this issue · 1 comments

Describe the bug

When attempted to deploy with the latest 4.4.1 I'm getting the below error. I did confirm that I have my permissions set properly.

Checking if there are files to commit…
Running post deployment cleanup jobs… 🗑️
/usr/bin/git checkout -B github-pages-deploy-action/kv3lm1vlt
fatal: detected dubious ownership in repository at '/__w/playwright-demo/playwright-demo/github-pages-deploy-action-temp-deployment-folder'
To add an exception for this directory, call:

	git config --global --add safe.directory /__w/playwright-demo/playwright-demo/github-pages-deploy-action-temp-deployment-folder
Error: The process '/usr/bin/git' failed with exit code 128
Notice: Deployment failed! ❌

Reproduction Steps

Run actions job with the below configuration

Logs

https://github.com/BMayhew/playwright-demo/actions/runs/3257638353/jobs/5349028463

Workflow

name: Playwright API Checks
on: [workflow_dispatch, pull_request]
permissions:
  contents: write
  pages: write

jobs:
  e2e-tests:
    timeout-minutes: 60
    runs-on: ubuntu-latest
    container: mcr.microsoft.com/playwright:v1.27.1-focal
    steps:
      - uses: actions/checkout@v2
      - name: Install Dependencies
        run: npm ci
      - name: Run Playwright tests
        run: npm run test
      - uses: actions/upload-artifact@v2
        if: always()
        with:
          name: playwright-report
          path: playwright-report/
      - name: Install rsync 📚
        if: always()
        run: |
          apt-get update && apt-get install -y rsync
      - name: Deploy 🚀
        uses: JamesIves/github-pages-deploy-action@v4.4.1
        if: always()
        with:
          branch: gh-pages
          folder: playwright-report

Can you try running the following before the deployment action runs?

git config --global safe.directory '*'

This looks related to submodules according to this thread here.