Skip to content

support: is there a recommended workflow for cleanup after changing keep_files back to false? #1136

@iandouglas

Description

@iandouglas

Checklist

  • I am using the latest version of this action.
  • I have read the latest README and followed the instructions.
  • I have read the latest GitHub Actions official documentation and learned the basic spec and concepts.

Describe your question

Hi folks,

We have keep_files set to true in a workflow, but now we need to find a way to clean up lingering PRs once we change this back to false ... is there a recommended clean-up process you can recommend, or steps to follow? Would love to get pointed in the right direction.

Relevant links

- name: Deploy to /gh-pages
         if: github.event_name == 'push' && github.ref == 'refs/heads/main'
         uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # pin@v3
         with:
           github_token: ${{ secrets.GITHUB_TOKEN }}
           publish_dir: documentation/build
           keep_files: true   # This preserves existing files in gh-pages branch especially for previews

# we want to change that to false, but how do we clean up the old files?

Relevant log output

we have a lot of previews here to clean up, but not sure of the process to delete them safely

Image

Additional context.

No response

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions