Skip to content

Commit 43160cc

Browse files
authored
Add dev docs cleanup workflow
1 parent 707aa84 commit 43160cc

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

.github/workflows/Documentation.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,28 @@ jobs:
1919
env:
2020
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
2121
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
dev-docs-cleanup:
23+
needs: docs
24+
name: dev docs cleanup
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Checkout gh-pages branch
28+
uses: actions/checkout@v4
29+
with:
30+
ref: gh-pages
31+
32+
- uses: julia-actions/setup-julia@v2
33+
with:
34+
version: '1'
35+
- uses: julia-actions/cache@v2
36+
37+
- name: Delete dev docs
38+
run: |
39+
git rm -rf ./*/dev/
40+
- name: Push changes
41+
run: |
42+
git config user.name "Documenter.jl"
43+
git config user.email "[email protected]"
44+
git commit -m "delete dev docs"
45+
git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree})
46+
git push --force origin gh-pages-new:gh-pages

0 commit comments

Comments
 (0)