Skip to content

fix: don't compress SVG's #376

fix: don't compress SVG's

fix: don't compress SVG's #376

Workflow file for this run

name: Deploy to Cloudflare Pages
on:
push:
branches: [main]
workflow_dispatch:
schedule:
- cron: '0 0 1 * *'
concurrency:
group: pages
cancel-in-progress: false
permissions: {}
jobs:
build-deploy-notify:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup pnpm
uses: pnpm/setup@v2
with:
cache: true
- name: Cache assets
uses: actions/cache@v6
with:
path: node_modules/.astro
key: astro-cache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml', 'astro.config.mjs') }}-${{ github.sha }}
restore-keys: |
astro-cache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml', 'astro.config.mjs') }}-
- name: Build Astro site
run: pnpm run build
- name: Deploy to Cloudflare Pages
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: pnpm exec wrangler pages deploy dist --project-name=hawksley --commit-dirty=true
- name: Purge Cloudflare Zone cache
run: |
curl -sSf \
-X POST \
-H "Authorization: Bearer ${{ secrets.CLOUDFLARE_API_TOKEN }}" \
-H "Content-Type: application/json" \
-d '{"purge_everything":true}' \
"https://api.cloudflare.com/client/v4/zones/${{ secrets.CLOUDFLARE_ZONE_ID }}/purge_cache"
- name: Submit sitemap to IndexNow
run: |
URL_JSON=$(jq -R -s -c 'split("\n") | map(select(length > 0))' dist/sitemap.txt)
curl -sSf \
-X POST "https://api.indexnow.org/indexnow" \
-H "Content-Type: application/json; charset=utf-8" \
-d "{
\"host\": \"hawksley.dev\",
\"key\": \"${{ secrets.INDEXNOW_KEY }}\",
\"keyLocation\": \"https://hawksley.dev/${{ secrets.INDEXNOW_KEY }}.txt\",
\"urlList\": $URL_JSON
}"
- name: Notify profile README repo
run: |
curl -sSf \
-X POST \
-H "Authorization: Bearer ${{ secrets.NOTIFY_README_TOKEN }}" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/ethanhawksley/ethanhawksley/dispatches" \
-d '{"event_type": "site_deployed"}'