Skip to content

Commit 6810aee

Browse files
committed
update
1 parent 1fbb8fa commit 6810aee

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/deploy-to-preview.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,15 @@ jobs:
2929
run: npm install
3030
- name: Build
3131
run: |
32-
response=$(curl -s -o /dev/null -w "%{http_code}" -X GET "https://api.cloudflare.com/client/v4/accounts/${{ secrets.CLOUDFLARE_ACCOUNT_ID }}/pages/projects/font-generator" \
32+
response=$(curl -s -o /dev/null -w "%{http_code}" -X GET "https://api.cloudflare.com/client/v4/accounts/${{ secrets.CLOUDFLARE_ACCOUNT_ID }}/pages/projects/font-generator-preview" \
3333
-H "Authorization: Bearer ${{ secrets.CLOUDFLARE_API_TOKEN }}")
3434
if [ $response -eq 404 ]; then
3535
echo "Project does not exist, creating..."
36-
npx wrangler pages project create font-generator --production-branch main
36+
npx wrangler pages project create font-generator-preview --production-branch main
3737
else
3838
echo "Project exists, skipping creation."
3939
fi
40+
sed -i 's/font-generator/font-generator-preview/' wrangler.toml
4041
npm run pages:build
4142
env:
4243
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
@@ -48,9 +49,4 @@ jobs:
4849
with:
4950
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
5051
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
51-
command: pages deploy --branch dev
52-
53-
- name: Print Deployment Url
54-
env:
55-
DEPLOYMENT_URL: ${{ steps.deploy.outputs.deployment-url }}
56-
run: echo $DEPLOYMENT_URL
52+
command: pages deploy --branch main

0 commit comments

Comments
 (0)