rubenmoor pushed/looking for changes in cms-content #76
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CMS Content Update | |
run-name: ${{ github.actor }} pushed/looking for changes in cms-content | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Changed Files | |
id: cms | |
uses: tj-actions/[email protected] | |
with: | |
files: cms-content/** | |
json: true | |
since_last_remote_commit: "true" | |
- name: web request to invalidate cache | |
if: steps.cms.outputs.any_changed == 'true' | |
run: | | |
set -x | |
curl -X POST https://palantype.com/api/cms/cache/invalidate \ | |
-H "Content-Type: application/json" \ | |
-d ${{steps.cms.outputs.all_changed_files}} |