2022-10-19 03:49:55 +08:00
|
|
|
name: cleanup
|
|
|
|
|
2023-05-07 05:11:07 +08:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-10-19 03:49:55 +08:00
|
|
|
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 }}"
|
|
|
|
});
|