Skip to content
This repository was archived by the owner on Mar 18, 2026. It is now read-only.

Commit 35fbca7

Browse files
authored
Merge pull request #29 from aibtcdev/staging
Release v1.0.0
2 parents 0d5ccdd + a5efa79 commit 35fbca7

39 files changed

Lines changed: 4507 additions & 1937 deletions

.github/workflows/deploy-with-wrangler.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Deploy to Cloudflare
22

33
on:
44
push:
5-
branches:
5+
branches:
66
- main
77
- staging
88
pull_request:
@@ -22,7 +22,6 @@ jobs:
2222
run: |
2323
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
2424
echo "WRANGLER_ENV=preview" >> $GITHUB_ENV
25-
echo "TEST_URL=https://aibtcdev-cache.PREVIEW_URL" >> $GITHUB_ENV
2625
elif [[ ${{ github.ref }} == 'refs/heads/staging' ]]; then
2726
echo "WRANGLER_ENV=staging" >> $GITHUB_ENV
2827
echo "TEST_URL=https://cache-staging.aibtc.dev" >> $GITHUB_ENV
@@ -32,12 +31,20 @@ jobs:
3231
fi
3332
3433
- name: Deploy with Wrangler
34+
id: deploy
3535
uses: cloudflare/wrangler-action@v3
3636
with:
3737
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
3838
environment: ${{ env.WRANGLER_ENV }}
3939

40+
- name: Set Test URL for Preview
41+
if: github.event_name == 'pull_request'
42+
run: |
43+
# Extract the preview URL from Wrangler output
44+
PREVIEW_URL=$(echo "${{ steps.deploy.outputs.deployment-url }}" | sed 's/https:\/\///')
45+
echo "TEST_URL=https://$PREVIEW_URL" >> $GITHUB_ENV
46+
4047
- name: Test Endpoints (10s delay)
4148
run: |
4249
chmod +x tests/run_tests.sh
43-
./tests/run_tests.sh ${{ env.TEST_URL }} true
50+
./tests/run_tests.sh ${{ env.TEST_URL }} true

0 commit comments

Comments
 (0)