Skip to content

Commit efc8938

Browse files
authored
fix: Revert "chore: refactor cf pages ci/cd from gopher-*to sprinter-*" (#102)
Reverts #100
1 parent c21cd9e commit efc8938

File tree

2 files changed

+16
-51
lines changed

2 files changed

+16
-51
lines changed

.github/workflows/cd.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,11 @@ jobs:
4949

5050
- name: Publish Docs to Cloudflare Pages
5151
if: ${{ steps.release.outputs.releases_created }}
52-
uses: cloudflare/wrangler-action@v3
52+
uses: cloudflare/pages-action@v1
5353
with:
54-
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
5554
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
5655
accountId: 2238a825c5aca59233eab1f221f7aefb
57-
command: pages deploy ./docs/build --project-name=sprinter-docs
58-
59-
- name: Publish POC to Cloudflare Pages
60-
if: ${{ steps.release.outputs.releases_created }}
61-
uses: cloudflare/wrangler-action@v3
62-
with:
56+
projectName: gopher-docs-preview
57+
directory: ./docs/build
6358
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
64-
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
65-
accountId: 2238a825c5aca59233eab1f221f7aefb
66-
command: pages deploy ./web/.svelte-kit/cloudflare --project-name=sprinter-poc
59+
branch: ${{ github.head_ref || github.ref_name }}

.github/workflows/ci.yml

Lines changed: 12 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)