Skip to content

Cleanup Deployments #113

Cleanup Deployments

Cleanup Deployments #113

name: Cleanup Deployments
# cleans up old deployments and only leaves the newest three from each PR.
# Does not (yet) remove deployments after an PR was merged or closed.
on:
schedule:
- cron: "0 5 * * 1"
jobs:
delete-old-deployments:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
ref: gh-pages
- name: Download cleanup script
run: wget https://raw.githubusercontent.com/opencast/opencast-editor-test/main/.github/scripts/cleanup-deployments.sh
- name: Run cleanup script
run: bash cleanup-deployments.sh
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: gh-pages
commit_message: Cleanup and delete old deployments