Skip to content

Preview

Preview #427

Workflow file for this run

name: Purge Fastly cache
on:
deployment:
workflow_dispatch:
inputs:
manual:
description: "boolean indicating if the action was triggered manually"
type: boolean
required: true
default: true
jobs:
purge:
if: ${{ github.event.deployment.environment == 'production' || inputs.manual == true }}
runs-on: ubuntu-latest
steps:
- run: |
curl -i -X POST "https://api.fastly.com/service/${{secrets.FASTLY_SERVICE_ID}}/purge_all" \
-H "Fastly-Key: ${{secrets.FASTLY_API_KEY}}" \
-H "Accept: application/json"