Skip to content

Commit bc944eb

Browse files
committed
chore: added action to revalidate the pages based on changed files
1 parent 15b7751 commit bc944eb

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.github/workflows/revalidate.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Revalidate Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
types: [closed]
8+
branches: [main]
9+
10+
jobs:
11+
revalidate:
12+
if: github.event.pull_request.merged == true || github.ref == 'refs/heads/main'
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: jitterbit/get-changed-files@v1
17+
id: files
18+
19+
- run: |
20+
curl -X POST \
21+
-H "Authorization: Bearer ${{ secrets.ISR_TOKEN }}" \
22+
-H "Content-Type: application/json" \
23+
-d '{"files":${{ steps.files.outputs.all }}}' \
24+
https://chaibuilder.com/chai/api/revalidate

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# docs
1+
# Chai Builder Docs

0 commit comments

Comments
 (0)