Skip to content

New event #15

New event #15 #26

Workflow file for this run

name: Deployment
on: [push]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Publish to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: f23d3bdabedf584dc8bd8fb94b41190e
projectName: backendisti
directory: web
branch: ${{ github.ref_name == 'master' && 'main' || github.ref_name }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Purge cache
env:
zone_id: "4604dc5827876a558829b184668da310"
api_token: "${{ secrets.CLOUDFLARE_API_TOKEN }}"
run: |
curl -fsX POST \
-H 'Authorization: Bearer ${{ env.api_token }}' \
-H 'Content-Type: application/json' \
--data '{"purge_everything": true}' \
https://api.cloudflare.com/client/v4/zones/${{ env.zone_id }}/purge_cache