ghaction-github-pages/.github/workflows/cleanup.yml

27 lines
497 B
YAML
Raw Normal View History

name: cleanup
on:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *'
jobs:
branches:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
branch:
- gh-pages
- gh-pages-keep
steps:
-
name: Delete branch
uses: actions/github-script@v6
with:
script: |
await github.rest.git.deleteRef({
...context.repo,
ref: "heads/${{ matrix.branch }}"
});