Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support: suggestions on clean up the actions_github_pages_UNIX created folder? #697

Open
3 tasks done
acastro2 opened this issue Jan 31, 2022 · 2 comments
Open
3 tasks done
Assignees
Labels
support User support

Comments

@acastro2
Copy link

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

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

@acastro2 acastro2 added the support User support label Jan 31, 2022
@peaceiris
Copy link
Owner

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.

@alaendle
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support User support
Projects
None yet
Development

No branches or pull requests

3 participants