Skip to content

Commit 7d33b5b

Browse files
committed
Try new version of andykenward/github-actions-cloudflare-pages@v3.4.0
andykenward/github-actions-cloudflare-pages#729
1 parent 6801f4b commit 7d33b5b

2 files changed

Lines changed: 31 additions & 19 deletions

File tree

.github/workflows/deploy-pr.yaml

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,35 @@ jobs:
4444
# This syntax makes it available to subsequent steps as ${{ env.PR_NUMBER }}
4545
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
4646
47-
- name: Deploy
48-
id: deploy
49-
uses: cloudflare/wrangler-action@v3
47+
- name: Deploy to Cloudflare Pages
48+
uses: andykenward/github-actions-cloudflare-pages@v3.4.0
49+
id: pages
5050
with:
51-
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
52-
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
53-
command: |
54-
pages deploy site/ --project-name=openshift-examples --branch pr-${{ env.PR_NUMBER }}
55-
# Optional: Enable this if you want to have GitHub Deployments triggered
56-
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
51+
cloudflare-api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
52+
cloudflare-account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
53+
cloudflare-project-name: ${{ vars.CLOUDFLARE_PROJECT_NAME }}
54+
directory: site
55+
github-token: ${{ secrets.GITHUB_TOKEN }}
56+
github-environment: Cloudflare Pages
57+
pr-number: ${{ env.PR_NUMBER }}
5758

58-
- name: Comment on PR
59-
env:
60-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61-
CMD_OUTPUT: ${{ steps.deploy.outputs.command-output }}
62-
DEPLOYMENT_URL: ${{ steps.deploy.outputs.deployment-url }}
63-
run: |
64-
gh pr comment ${{ env.PR_NUMBER }} \
65-
--repo ${{ github.repository }} \
66-
--body "🚀 **Preview Deployment Success!** View your live changes here: $DEPLOYMENT_URL\n\n$CMD_OUTPUT"
59+
# - name: Deploy
60+
# id: deploy
61+
# uses: cloudflare/wrangler-action@v3
62+
# with:
63+
# apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
64+
# accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
65+
# command: |
66+
# pages deploy site/ --project-name=openshift-examples --branch pr-${{ env.PR_NUMBER }}
67+
# # Optional: Enable this if you want to have GitHub Deployments triggered
68+
# gitHubToken: ${{ secrets.GITHUB_TOKEN }}
69+
70+
# - name: Comment on PR
71+
# env:
72+
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
# CMD_OUTPUT: ${{ steps.deploy.outputs.command-output }}
74+
# DEPLOYMENT_URL: ${{ steps.deploy.outputs.deployment-url }}
75+
# run: |
76+
# gh pr comment ${{ env.PR_NUMBER }} \
77+
# --repo ${{ github.repository }} \
78+
# --body "🚀 **Preview Deployment Success!** View your live changes here: $DEPLOYMENT_URL\n\n$CMD_OUTPUT"

.github/workflows/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
run: mkdocs build
3232

3333
- name: Deploy to Cloudflare Pages
34-
uses: andykenward/github-actions-cloudflare-pages@v3.0.0
34+
uses: andykenward/github-actions-cloudflare-pages@v3.4.0
3535
id: pages
3636
with:
3737
cloudflare-api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}

0 commit comments

Comments
 (0)