We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c71925d commit d99e295Copy full SHA for d99e295
.github/workflows/cleanup-gh-pages.yml
@@ -0,0 +1,35 @@
1
+name: Cleanup GitHub Pages on PR Close
2
+
3
+on:
4
+ pull_request:
5
+ types:
6
+ - closed
7
8
+jobs:
9
+ cleanup:
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: write
13
+ pages: write
14
+ pull-requests: write
15
16
+ steps:
17
+ - uses: actions/checkout@v4
18
19
+ - name: Fetch gh-pages branch
20
+ run: |
21
+ git fetch origin gh-pages:gh-pages
22
+ mkdir gh-pages
23
+ git --work-tree=gh-pages checkout gh-pages -- .
24
25
+ - name: Remove PR directory
26
27
+ rm -rf gh-pages/${{ github.event.pull_request.number }}
28
29
+ - name: Deploy report to GitHub Pages
30
+ uses: peaceiris/actions-gh-pages@v3
31
+ with:
32
+ github_token: ${{ secrets.GITHUB_TOKEN }}
33
+ publish_dir: gh-pages
34
+ destination_dir: .
35
+ force_orphan: true
0 commit comments