Skip to content

Commit 83b0073

Browse files
committed
chore: refactor cf pages ci/cd from gopher-*to sprinter-*
1 parent 1026472 commit 83b0073

File tree

2 files changed

+27
-16
lines changed

2 files changed

+27
-16
lines changed

.github/workflows/cd.yml

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

5050
- name: Publish Docs to Cloudflare Pages
5151
if: ${{ steps.release.outputs.releases_created }}
52-
uses: cloudflare/pages-action@v1
52+
uses: cloudflare/wrangler-action@v3
5353
with:
54+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
5455
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
5556
accountId: 2238a825c5aca59233eab1f221f7aefb
56-
projectName: gopher-docs-preview
57-
directory: ./docs/build
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:
5863
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
59-
branch: ${{ github.head_ref || github.ref_name }}
64+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
65+
accountId: 2238a825c5aca59233eab1f221f7aefb
66+
command: pages deploy ./web/.svelte-kit/cloudflare --project-name=sprinter-poc

.github/workflows/ci.yml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,25 @@ jobs:
2929
run: 'yarn run test:unit'
3030
- name: "Integrations Tests"
3131
run: 'yarn run test:integrations'
32-
- name: Publish POC to Cloudflare Pages
33-
uses: cloudflare/pages-action@v1
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+
uses: cloudflare/wrangler-action@v3
3442
with:
43+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
3544
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
3645
accountId: 2238a825c5aca59233eab1f221f7aefb
37-
projectName: gopher-poc
38-
directory: ./web/.svelte-kit/cloudflare
39-
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
46+
command: pages deploy ./docs/build --project-name=sprinter-docs --branch=${{ env.CF_BRANCH_NAME }}
47+
- name: Publish POC to Cloudflare Pages
48+
uses: cloudflare/wrangler-action@v3
4349
with:
50+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
4451
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
4552
accountId: 2238a825c5aca59233eab1f221f7aefb
46-
projectName: gopher-docs-preview
47-
directory: ./docs/build
48-
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
49-
branch: ${{ github.head_ref || github.ref_name }}
53+
command: pages deploy ./web/.svelte-kit/cloudflare --project-name=sprinter-poc --branch=${{ env.CF_BRANCH_NAME }}

0 commit comments

Comments
 (0)