Skip to content

Commit c7ed6e5

Browse files
tcouperxaviaracil
authored andcommitted
fix: trigger autowarm to speed up first render
1 parent 2f8e431 commit c7ed6e5

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/deploy-cloud-run.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,16 @@ jobs:
8787
-t ${{ steps.vars.outputs.IMAGE_URI }} \
8888
--push .
8989
90+
- name: Set health probe path
91+
run: |
92+
BASE="${ASTRO_BASE_PATH:-/}"
93+
BASE="${BASE%/}"
94+
if [ -z "$BASE" ] || [ "$BASE" = "/" ]; then
95+
echo "HEALTHZ_PATH=/healthz" >> "$GITHUB_ENV"
96+
else
97+
echo "HEALTHZ_PATH=${BASE}/healthz" >> "$GITHUB_ENV"
98+
fi
99+
90100
- name: Deploy to Cloud Run
91101
id: deploy
92102
uses: google-github-actions/deploy-cloudrun@v2
@@ -98,10 +108,10 @@ jobs:
98108
--allow-unauthenticated
99109
--ingress=internal-and-cloud-load-balancing
100110
--port=4321
101-
--startup-probe=httpGet.port=4321,initialDelaySeconds=10,timeoutSeconds=10,periodSeconds=120,failureThreshold=10
111+
--startup-probe=httpGet.path=${{ env.HEALTHZ_PATH }},httpGet.port=4321,initialDelaySeconds=10,timeoutSeconds=10,periodSeconds=120,failureThreshold=10
112+
--memory=2Gi
102113
--timeout=60
103114
--min-instances=1
104-
--memory=1Gi
105115
--concurrency=10
106116
--cpu=2
107117
--set-env-vars ASTRO_BASE_PATH=${{ env.ASTRO_BASE_PATH }}

0 commit comments

Comments
 (0)