Skip to main content

How do I free up storage space for GitHub artifacts?

Depending on your GitHub plan, you may encounter errors when deploying builds that contain a large number of pages due to capacity limitations. To prevent such errors, delete your old artifacts periodically.

Below are some possible solutions.

Modify retention-days in the YAML file

You can modify the retention days for artifacts and logs in the .github/YAML file; i.e., change retention-days: 7 to retention-days: 1.

Create a private action

Modify your .github/YAML file as follows to create a private GitHub Action:

- name: Remove old artifacts
uses: ./.github/actions/gha-remove-artifacts-master
with:
age: '0 days'
info

For more information on private actions, see GitHub Docs: Example using a private action.

Use a third-party application

You can also use third-party GitHub apps such as gha-remove-artifacts.

When using a third-party app, the source repository may be deleted or modified without notice, causing unexpected errors. As such, install the application at your own risk and be sure to verify its operations periodically.

info

For more information, see FAQ: Can I use third-party GitHub apps?.


Support

If you have any other questions, please contact us or check out Our Slack Community.