File tree Expand file tree Collapse file tree 3 files changed +28
-13
lines changed Expand file tree Collapse file tree 3 files changed +28
-13
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,19 @@ jobs:
1919 run : pnpm --filter @dub/analytics-script build
2020
2121 - name : Deploy to Cloudflare Pages
22+ id : cloudflare-deploy
2223 uses : cloudflare/wrangler-action@v3
2324 with :
2425 apiToken : ${{ secrets.CLOUDFLARE_PAGES_API_KEY }}
2526 accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
2627 command : pages deploy dist --project-name=dub-cdn --commit-dirty=true
2728 workingDirectory : packages/script
2829 packageManager : pnpm
30+
31+ - name : Save Deployment URL to file
32+ run : echo "${{ steps.cloudflare-deploy.outputs.deployment-url }}" > deployment_url.txt
33+
34+ - uses : actions/upload-artifact@v4
35+ with :
36+ name : deployment-url
37+ path : deployment_url.txt
Original file line number Diff line number Diff line change @@ -37,15 +37,21 @@ jobs:
3737 working-directory : apps/nextjs
3838 run : pnpm exec playwright install chromium --with-deps
3939
40- # - name: Run Playwright tests
41- # working-directory: apps/nextjs
42- # run: pnpm exec playwright test
43- # env:
44- # DUB_ANALYTICS_SCRIPT_URL: ${{ github.event.workflow_run.outputs.deployment_url }}/analytics/script.site-visit.outbound-domains.js
45-
46- # - uses: actions/upload-artifact@v4
47- # if: ${{ !cancelled() }}
48- # with:
49- # name: playwright-report
50- # path: apps/nextjs/playwright-report/
51- # retention-days: 30
40+ - name : Download deployment URL
41+ uses : actions/download-artifact@v4
42+ with :
43+ name : deployment-url
44+ path : .
45+
46+ - name : Run Playwright tests
47+ working-directory : apps/nextjs
48+ run : pnpm exec playwright test
49+ env :
50+ DUB_ANALYTICS_SCRIPT_URL : $(cat deployment_url.txt)/analytics/script.site-visit.outbound-domains.js
51+
52+ - uses : actions/upload-artifact@v4
53+ if : ${{ !cancelled() }}
54+ with :
55+ name : playwright-report
56+ path : apps/nextjs/playwright-report/
57+ retention-days : 30
Original file line number Diff line number Diff line change 11( function ( ) {
2- console . log ( 'Test the GH action 2 ' ) ;
2+ console . log ( 'Test the GH action 3 ' ) ;
33
44 // Store script reference for extensions
55 const script = document . currentScript ;
You can’t perform that action at this time.
0 commit comments