Skip to content

Commit

Permalink
use wrangler-action github deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
marcustyphoon committed Nov 27, 2024
1 parent 3ea7805 commit d1c2651
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
apiToken: ${{ secrets.CI_CF_PAGES }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: pages deploy dist-cf --project-name=${{ env.PAGES_PROJECT_NAME }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Github Pages
uses: actions/configure-pages@v5
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-with-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
apiToken: ${{ secrets.CI_CF_PAGES }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: pages deploy dist-cf --project-name=${{ env.PAGES_PROJECT_NAME }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Github Pages
uses: actions/configure-pages@v5
Expand Down
25 changes: 13 additions & 12 deletions .github/workflows/previews-cf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,18 @@ jobs:
apiToken: ${{ secrets.CI_CF_PAGES }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: pages deploy dist --project-name=${{ env.PAGES_PROJECT_NAME }} --branch=${{ github.head_ref || github.ref_name }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

- name: Comment PR
uses: thollander/actions-comment-pull-request@v3
with:
message: |
Deployed build to Cloudflare!
# - name: Comment PR
# uses: thollander/actions-comment-pull-request@v3
# with:
# message: |
# Deployed build to Cloudflare!

| | |
| ----------------------- | - |
| **Last commit:** | ${{ github.event.pull_request.head.sha || github.event.workflow_run.head_sha || github.sha }} |
| **Preview URL**: | ${{ steps.wrangler-action.outputs.deployment-url }} |
| **Branch Preview URL**: | https://${{ github.head_ref || github.ref_name }}.${{ env.PAGES_PROJECT_URL_SLUG }}.pages.dev |
comment-tag: deployment
mode: upsert
# | | |
# | ----------------------- | - |
# | **Last commit:** | ${{ github.event.pull_request.head.sha || github.event.workflow_run.head_sha || github.sha }} |
# | **Preview URL**: | ${{ steps.wrangler-action.outputs.deployment-url }} |
# | **Branch Preview URL**: | https://${{ github.head_ref || github.ref_name }}.${{ env.PAGES_PROJECT_URL_SLUG }}.pages.dev |
# comment-tag: deployment
# mode: upsert

0 comments on commit d1c2651

Please sign in to comment.