@@ -29,49 +29,21 @@ jobs:
2929 run : ' yarn run test:unit'
3030 - name : " Integrations Tests"
3131 run : ' yarn run test:integrations'
32- - name : Set branch name for Cloudflare Pages
33- id : cf-branch
34- run : |
35- if [[ "${{ github.ref_name }}" == "master" ]]; then
36- echo "CF_BRANCH_NAME=preview" >> $GITHUB_ENV
37- else
38- echo "CF_BRANCH_NAME=${{ github.head_ref || github.ref_name }}" >> $GITHUB_ENV
39- fi
40- - name : Publish Docs to Cloudflare Pages
41- id : docs-publish
42- uses : cloudflare/wrangler-action@v3
32+ - name : Publish POC to Cloudflare Pages
33+ uses : cloudflare/pages-action@v1
4334 with :
44- gitHubToken : ${{ secrets.GITHUB_TOKEN }}
4535 apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
4636 accountId : 2238a825c5aca59233eab1f221f7aefb
47- command : pages deploy ./docs/build --project-name=sprinter-docs --branch=${{ env.CF_BRANCH_NAME }}
48- - name : Publish POC to Cloudflare Pages
49- id : poc-publish
50- uses : cloudflare/wrangler-action@v3
51- with :
37+ projectName : gopher-poc
38+ directory : ./web/.svelte-kit/cloudflare
5239 gitHubToken : ${{ secrets.GITHUB_TOKEN }}
40+ branch : ${{ github.head_ref || github.ref_name }}
41+ - name : Publish Preview Docs to Cloudflare Pages
42+ uses : cloudflare/pages-action@v1
43+ with :
5344 apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
5445 accountId : 2238a825c5aca59233eab1f221f7aefb
55- command : pages deploy ./web/.svelte-kit/cloudflare --project-name=sprinter-poc --branch=${{ env.CF_BRANCH_NAME }}
56- - name : Generate Deployment Summary
57- run : |
58- echo "# 🚀 Deployment Summary" >> $GITHUB_STEP_SUMMARY
59- echo "" >> $GITHUB_STEP_SUMMARY
60- echo "| **Project** | **Preview URL** |" >> $GITHUB_STEP_SUMMARY
61- echo "| ----------------------- | ---------------- |" >> $GITHUB_STEP_SUMMARY
62- echo "| **Docs** | [View Docs -> ${{ steps.docs-publish.outputs.deployment-url }}](${{ steps.docs-publish.outputs.deployment-url }}) |" >> $GITHUB_STEP_SUMMARY
63- echo "| **POC** | [View POC -> ${{ steps.poc-publish.outputs.deployment-url }}](${{ steps.poc-publish.outputs.deployment-url }}) |" >> $GITHUB_STEP_SUMMARY
64- - name : Notify About Deployment
65- if : ${{ github.actor != 'dependabot[bot]' }}
66- uses : actions/github-script@v7
67- with :
68- script : |
69- const docsUrl = `**Docs:** [View Deployment -> ${{ steps.docs-publish.outputs.deployment-url }}](${{ steps.docs-publish.outputs.deployment-url }})`;
70- const pocUrl = `**POC:** [View Deployment -> ${{ steps.poc-publish.outputs.deployment-url }}](${{ steps.poc-publish.outputs.deployment-url }})`;
71- const message = `🚀 **Deployment Completed**\n\n${docsUrl}\n${pocUrl}`;
72- await github.rest.issues.createComment({
73- issue_number: context.issue.number,
74- owner: context.repo.owner,
75- repo: context.repo.repo,
76- body: message,
77- });
46+ projectName : gopher-docs-preview
47+ directory : ./docs/build
48+ gitHubToken : ${{ secrets.GITHUB_TOKEN }}
49+ branch : ${{ github.head_ref || github.ref_name }}
0 commit comments