Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: refactor cf pages ci/cd from gopher-*to sprinter-* #100

Merged
merged 12 commits into from
Dec 10, 2024
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 }}
Loading