Skip to content

ci: output more info for debugging GHA #27

ci: output more info for debugging GHA

ci: output more info for debugging GHA #27

on:

Check failure on line 1 in .github/workflows/ghpages-cleanup.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ghpages-cleanup.yml

Invalid workflow file

(Line: 11, Col: 15): Expected format {org}/{repo}[/path]@ref. Actual 'actions/checkout'
schedule:
- cron: 0 0 * * 6 # midnight on Saturdays
workflow_dispatch:
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Check out GH Pages branch
uses: actions/checkout
with:
# replace `fetch-depth` with `shallow-since` if and when actions/checkout#619 (or an equivalent) gets merged
fetch-depth: 0
ref: gh-pages
- name: Mark stale directories for removal
run: |
for dir in */; do
if [ -z "$(git log -n 1 --since "1 month ago" -- "$dir")" ]; then
git rm -r "$dir"
fi
done
git status
- name: Commit
run: "git commit -m 'chore: remove stale GH Pages branches'"
- name: Push
run: "git push"