mirror of
https://gitea.com/gitea/docs.git
synced 2026-09-17 19:55:34 +00:00
Add Cloudflare Pages cache headers for static assets (gitea/docs#473)
Co-authored-by: Lunny Xiao <[email protected]>
This commit is contained in:
committed by
techknowlogick
parent
9f3bb6cc19
commit
31c6782d0c
@@ -46,6 +46,13 @@ jobs:
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
run: |
|
||||
# cloudflare/_headers is only meaningful for the Cloudflare Pages
|
||||
# deployment, so it is copied into build/ here, after the S3 sync
|
||||
# step above has already run. If it were placed in build/ any
|
||||
# earlier, that S3 sync would publish it to S3/CloudFront and make
|
||||
# it publicly accessible at /_headers there.
|
||||
cp cloudflare/_headers build/_headers
|
||||
test -f build/_headers || exit 1
|
||||
pnpm dlx wrangler@4 pages deploy build \
|
||||
--project-name docs-gitea-com \
|
||||
--branch main
|
||||
|
||||
Reference in New Issue
Block a user