Skip to content

Commit

Permalink
chore: refactor cf pages ci/cd from gopher-*to sprinter-*
Browse files Browse the repository at this point in the history
  • Loading branch information
BeroBurny committed Dec 10, 2024
1 parent 461cf91 commit 755577a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 16 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,18 @@ jobs:

- name: Publish Docs to Cloudflare Pages
if: ${{ steps.release.outputs.releases_created }}
uses: cloudflare/pages-action@v1
uses: cloudflare/wrangler-action@v3
with:
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: 2238a825c5aca59233eab1f221f7aefb
projectName: gopher-docs-preview
directory: ./docs/build
command: pages deploy ./docs/build --project-name=sprinter-docs

- name: Publish POC to Cloudflare Pages
if: ${{ steps.release.outputs.releases_created }}
uses: cloudflare/wrangler-action@v3
with:
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref || github.ref_name }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: 2238a825c5aca59233eab1f221f7aefb
command: pages deploy ./web/.svelte-kit/cloudflare --project-name=sprinter-poc
28 changes: 16 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,25 @@ jobs:
run: 'yarn run test:unit'
- name: "Integrations Tests"
run: 'yarn run test:integrations'
- name: Publish POC to Cloudflare Pages
uses: cloudflare/pages-action@v1
- name: Set branch name for Cloudflare Pages
id: cf-branch
run: |
if [[ "${{ github.ref_name }}" == "master" ]]; then
echo "CF_BRANCH_NAME=preview" >> $GITHUB_ENV
else
echo "CF_BRANCH_NAME=${{ github.head_ref || github.ref_name }}" >> $GITHUB_ENV
fi
- name: Publish Docs to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: 2238a825c5aca59233eab1f221f7aefb
projectName: gopher-poc
directory: ./web/.svelte-kit/cloudflare
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref || github.ref_name }}
- name: Publish Preview Docs to Cloudflare Pages
uses: cloudflare/pages-action@v1
command: pages deploy ./docs/build --project-name=sprinter-docs --branch=${{ env.CF_BRANCH_NAME }}
- name: Publish POC to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: 2238a825c5aca59233eab1f221f7aefb
projectName: gopher-docs-preview
directory: ./docs/build
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref || github.ref_name }}
command: pages deploy ./web/.svelte-kit/cloudflare --project-name=sprinter-poc --branch=${{ env.CF_BRANCH_NAME }}

0 comments on commit 755577a

Please sign in to comment.