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

31 lines
588 B
YAML
Raw Normal View History

name: cleanup
2023-05-07 05:11:07 +08:00
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
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@v7
with:
script: |
await github.rest.git.deleteRef({
...context.repo,
ref: "heads/${{ matrix.branch }}"
});