actions-gh-pages
actions-gh-pages copied to clipboard
support: suggestions on clean up the actions_github_pages_UNIX created folder?
Checklist
- [X] I am using the latest version of this action.
- [X] I have read the latest README and followed the instructions.
- [X] I have read the latest GitHub Actions official documentation and learned the basic spec and concepts.
Describe your question
I'm using self-hosted workers, and the actions_github_pages folders pile up fast. Any suggestion for cleaning up? Is the folder name output of the action?
Relevant links
name: Update Docs
on:
workflow_dispatch:
push:
branches:
- 'main'
schedule:
- cron: '0 9 * * *'
jobs:
Update-Docs:
runs-on: bionic
steps:
- uses: actions/checkout@v1
with:
submodules: "recursive"
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: "3.x"
- run: pip install -r requirements.txt
- name: Update MkDocs
run: mkdocs build
- name: Push to github pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
clean-working-directory:
runs-on: bionic
needs: Update-Docs
steps:
- name: Clean working directory
run: |
cd $RUNNER_WORKSPACE
cd ..
rm -r *
Relevant log output
No response
Additional context.
No response
Thank you for asking this!
We are already aware of this as an issue and this will be resolved in #686 (Or, I will split this issue to another issue)
As a workaround, we can run find ${HOME} -name "actions_github_pages_*" -delete
in the clean-working-directory job.
Thank you for asking this!
We are already aware of this as an issue and this will be resolved in #686 (Or, I will split this issue to another issue)
As a workaround, we can run
find ${HOME} -name "actions_github_pages_*" -delete
in the clean-working-directory job.
Slightly better workaround - find ${HOME} -name "actions_github_pages_*" -exec rm -rf {} +
- to also delete non empty directories (at least this was necessary on my RHEL flavored implementation of find
).