Skip to content

Commit d721308

Browse files
committed
chore: Simplify GitHub Actions deployment workflows
1 parent cbbc84d commit d721308

File tree

3 files changed

+1
-44
lines changed

3 files changed

+1
-44
lines changed

.github/workflows/deploy.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,7 @@ jobs:
2626
run: pnpm install
2727

2828
- name: Deploy to Cloudflare Workers
29-
id: deploy-production
3029
uses: cloudflare/wrangler-action@v3
3130
with:
3231
apiToken: ${{ secrets.CF_API_TOKEN }}
3332
command: deploy
34-
35-
- name: Get deployment URL
36-
id: deployment-url
37-
run: |
38-
PRODUCTION_URL=$(echo '${{ steps.deploy-production.outputs.deployedUrl }}')
39-
if [ -z "$PRODUCTION_URL" ]; then
40-
PRODUCTION_URL="https://github-achievements-api.wangrunlin.workers.dev"
41-
fi
42-
echo "url=$PRODUCTION_URL" >> $GITHUB_OUTPUT
43-
44-
- name: Comment on commit
45-
uses: peter-evans/commit-comment@v3
46-
with:
47-
body: |
48-
🚀 Production deployment is ready!
49-
50-
🔗 [Production Link](${{ steps.deployment-url.outputs.url }})
51-
52-
Branch: ${{ github.ref_name }}
53-
Commit: ${{ github.sha }}

.github/workflows/preview.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,7 @@ jobs:
2626
run: pnpm install
2727

2828
- name: Deploy to Cloudflare Workers with Preview
29-
id: deploy-preview
3029
uses: cloudflare/wrangler-action@v3
3130
with:
3231
apiToken: ${{ secrets.CF_API_TOKEN }}
3332
command: deploy --env preview
34-
35-
- name: Get deployment URL
36-
id: deployment-url
37-
run: |
38-
PREVIEW_URL=$(echo '${{ steps.deploy-preview.outputs.deployedUrl }}')
39-
if [ -z "$PREVIEW_URL" ]; then
40-
PREVIEW_URL="https://github-achievements-api-preview.wangrunlin.workers.dev"
41-
fi
42-
echo "url=$PREVIEW_URL" >> $GITHUB_OUTPUT
43-
44-
- name: Comment on commit
45-
uses: peter-evans/commit-comment@v3
46-
with:
47-
body: |
48-
🚀 Preview deployment is ready!
49-
50-
🔗 [Preview Link](${{ steps.deployment-url.outputs.url }})
51-
52-
Branch: ${{ github.ref_name }}
53-
Commit: ${{ github.sha }}

wrangler.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ main = "src/index.ts"
33
compatibility_date = "2025-02-27"
44

55
[env.preview]
6-
name = "github-achievements-api-preview"
7-
# Asegúrate de que el entorno de vista previa tenga la misma configuración que el entorno principal
6+
name = "github-achievements-api-preview"

0 commit comments

Comments
 (0)