File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -371,3 +371,9 @@ jobs:
371371 run : |
372372 npm publish rescript-${{ needs.package.outputs.rescript_version }}.tgz --tag ci
373373 npm publish rescript-std-${{ needs.package.outputs.rescript_version }}.tgz --tag ci
374+
375+ - name : Update Website Playground
376+ env :
377+ NEXT_REVALIDATE_SECRET_TOKEN : ${{ secrets.NEXT_REVALIDATE_SECRET_TOKEN }}
378+ run : ./playground/website_update_playground.sh
379+ shell : bash
Original file line number Diff line number Diff line change 1+ # /usr/bin/sh
2+
3+ if [ -z " ${NEXT_REVALIDATE_SECRET_TOKEN} " ]; then
4+ echo " NEXT_REVALIDATE_SECRET_TOKEN environment variable not set."
5+ exit 1
6+ fi
7+
8+ echo " Sending request to rescript-lang.org/api/revalidate"
9+
10+ STATUS_CODE=$( curl -s -o /dev/null -w " %{http_code}" " https://rescript-lang.org/api/revalidate?secret=${NEXT_REVALIDATE_SECRET_TOKEN} " )
11+
12+ if [[ " $STATUS_CODE " == 200 ]]; then
13+ echo " Revalidation finished"
14+ exit 0
15+ fi
16+
17+ echo " Failed to revalidate"
18+ echo " Status Code: $STATUS_CODE "
19+ exit 1
You can’t perform that action at this time.
0 commit comments