8000 Deleted files not removed when keep_history: true · Issue #153 · crazy-max/ghaction-github-pages · GitHub
[go: up one dir, main page]

Skip to content
Deleted files not removed when keep_history: true #153
@ysndr

Description

@ysndr

Behaviour

With keep_history: true, deleting a folder does not push file deletions to the remote repository.

Steps to reproduce this issue

Configure action with: keep_history: true

  1. Push to gh_pages
    /a/file.txt
    /b/file.txt
    
  2. Remove files/directory from parent repository
       /a/file.txt
     - /b/file.txt
    
  3. Push to gh_pages

Expected behaviour

gh_pages repo/branch does not contain directory b/

Actual behaviour

Directory b/ still present

Configuration

name: "Cleanup Preview"

on:
  pull_request:
    types: [ closed ]

env:
  GITHUB_PR_NUMBER: "${{github.event.number}}"

jobs:
  cleanup:
    runs-on: ubuntu-latest
    steps:
    - name: Pull release
      uses: actions/checkout@v2
      with:
        repository: ysndr/beta
        ref: gh-pages
        path: preview

    - name: Remove Preview
      run: |
        ls -la
        [ -d preview/${{ env.GITHUB_PR_NUMBER }} ] && rm -r preview/${{ env.GITHUB_PR_NUMBER }}
        ls -la

        rm  -rf preview/.git


    - name: Push
      uses: crazy-max/ghaction-github-pages@v2
      with:
        repo: ysndr/beta
        target_branch: gh-pages
        build_dir: ./preview
        committer: github-ci <notifications+ci-blog@ysndr.de>
        verbose: true
       keep_history: true
      env:
        GH_PAT: ${{ secrets.DEPLOY_TOKEN }}

Logs

logs_65.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0