diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60c31c8..010b56b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: ci on: schedule: - - cron: '0 10 * * *' # everyday at 10am + - cron: '0 10 * * *' push: branches: - 'dev' diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml new file mode 100644 index 0000000..32b1480 --- /dev/null +++ b/.github/workflows/cleanup.yml @@ -0,0 +1,26 @@ +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 }}" + });