Skip to content

Post Deployment Success #193

Post Deployment Success

Post Deployment Success #193

name: 'Post Deployment Success'
on: deployment_status
jobs:
sitemap:
name: ping bing and google with updates
if: github.event.deployment_status.state == 'success' && github.event.deployment_status.environment == 'production'
runs-on: ubuntu-latest
steps:
- name: Ping Google
run: |
curl https://www.google.com/ping?sitemap=https://thatconference.com/sitemap.xml
- name: Purge CloudFlare
run: |
curl -X POST "https://api.cloudflare.com/client/v4/zones/${{ secrets.CLOUDFLARE_THATCONFERENCE_ID }}/purge_cache" -H "Authorization: Bearer ${{ secrets.CLOUDFLARE_PURGE_TOKEN }}" -H "Content-Type:application/json" --data '{"purge_everything":true}'