Skip to content

cleanup

cleanup #40

Workflow file for this run

name: cleanup
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read
on:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *'
jobs:
branches:
runs-on: ubuntu-latest
permissions:
# required to remove git branch
contents: write
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 }}"
});