Skip to content

GH pages cleanup

GH pages cleanup #34

name: GH pages cleanup
on:
delete:
jobs:
cleanup:
if: github.event.ref_type == 'branch'
runs-on: ubuntu-latest
steps:
- name: Checkout pages
uses: actions/checkout@v2
with:
ref: fairmat-docs
persist-credentials: false
fetch-depth: 0
- name: Remove branch directory
run: rm -rf docs/${{ github.event.ref }}
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: fairmat-docs
message: Fairmat docs cleanup ${{ steps.date.outputs.date }}