Skip to content

Commit

Permalink
add gh workflow which will delete docs in mike when a reference is de…
Browse files Browse the repository at this point in the history
…leted (#322)
  • Loading branch information
e-lo committed Jul 6, 2023
1 parent 708772f commit 01ee68c
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/clean-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Clean Docs for Deleted References
on:
delete:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Document branch deleting
run: echo ${{ github.ref_name }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install mike
run: |
python -m pip install --upgrade pip
pip install mike
- name: Configure Git user
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Delete defunct docs versions
run: |
echo "Deleting ${{ github.event.ref_name }} version from docs"
mike delete --rebase --push ${{ github.event.ref_name }}

0 comments on commit 01ee68c

Please sign in to comment.