Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/deploy-site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,16 @@ jobs:
# without hitting the anonymous GitHub API rate limit.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# wrangler pages deploy will not create a project in CI (stdin is not a
# TTY). Create "memcache" on first publish so a new site can go live.
- name: Publish to Cloudflare Pages
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: pnpm exec wrangler pages deploy site/dist --project-name=memcache --branch=main --commit-dirty=true
run: |
set -euo pipefail
if ! pnpm exec wrangler pages project list --json \
| jq -e 'any(.[]; ."Project Name" == "memcache")' >/dev/null; then
pnpm exec wrangler pages project create memcache --production-branch=main
fi
pnpm exec wrangler pages deploy site/dist --project-name=memcache --branch=main --commit-dirty=true