Cleanup old dev versions #685
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Cleanup old dev versions | |
| # Once a day: | |
| # - remove old dev versions | |
| # - execute build of documentation to update download links | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "1 3 * * *" | |
| jobs: | |
| update-package: | |
| name: Cleanup old versions | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Cleanup | |
| env: | |
| DO_SPACE_ACCESS_KEY: ${{ secrets.DO_SPACE_ACCESS_KEY }} | |
| DO_SPACE_SECRET_KEY: ${{ secrets.DO_SPACE_SECRET_KEY }} | |
| run: | | |
| cd tools/cleanup | |
| pip install -r requirements.txt | |
| ./cleanup.py | |
| - name: Update documention | |
| env: | |
| RTD_API_TOKEN: ${{ secrets.RTD_API_TOKEN }} | |
| run: | | |
| curl -L -X POST -H "Authorization: Token $RTD_API_TOKEN" \ | |
| https://readthedocs.org/api/v3/projects/nethsecurity-docs/versions/latest/builds | |
| curl -L -X POST -H "Authorization: Token $RTD_API_TOKEN" \ | |
| https://readthedocs.org/api/v3/projects/nethsecurity-docs-it/versions/latest/builds |