Skip to content

Split news section and move TTT to recent #2

Split news section and move TTT to recent

Split news section and move TTT to recent #2

# from https://github.com/CliMA/ClimaTimeSteppers.jl
name: Remove preview once PR is merged or closed
on:
pull_request:
types: [closed]
jobs:
remove-preview-after-merge:
runs-on: ubuntu-latest
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Delete preview and history + push changes
run: |
if [ -d "previews/PR${{ github.event.number }}" ]; then
git config user.name "GH workflow"
git config user.email "[email protected]"
git rm -rf "previews/PR${{ github.event.number }}"
git commit -m "delete preview"
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
git push --force origin gh-pages-new:gh-pages
fi