stukennedy
stukennedy
CDCloudflare Developers
Created by Jerome on 11/10/2023 in #vectorize
Vectorize feedback
does it run locally in development? or only on a deployed worker?
16 replies
CDCloudflare Developers
Created by stukennedy on 10/18/2023 in #pages-help
Testing R2 from Pages
finding it quite frustrating all the differences between Workers and Pages, I'm running a Queue, which is called from Pages, but you can only have a Queue consumer in a Worker. There's dev support for Queues in Workers but not in Pages ... so the whole feature is impossible to test. Wasted hours trying to figure out what I was doing wrong. The toml file is an utter disaster too ... there's literally no spec on it anywhere, just isolated examples of use-cases. And again, it's only used by Workers. Trying to figure out how to get the different environments to work both locally, in production and on preview when you're using Workers and Pages is horrific.
3 replies
CDCloudflare Developers
Created by stukennedy on 10/4/2023 in #pages-help
Worker Analytics Beta not working
woo
7 replies
CDCloudflare Developers
Created by stukennedy on 10/4/2023 in #pages-help
Worker Analytics Beta not working
oh wait ... it started working
7 replies
CDCloudflare Developers
Created by stukennedy on 10/4/2023 in #pages-help
Worker Analytics Beta not working
yeah I set it manually there ... still didn't work
7 replies
CDCloudflare Developers
Created by peachneo on 9/19/2023 in #pages-help
Github integration after deploying with Wrangler
I've switched to using Github Actions, and they work really well. you just need to create a file .github/workflows/pages-deployment.yaml with this sort of content
on: [push]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Publish to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: npm install && npm run build
- name: Run Tests
run: npm test
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: 'YOUR_PROJECTNAME'
directory: 'YOUR_STATIC_FILES_DIRECTORY'
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
on: [push]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Publish to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: npm install && npm run build
- name: Run Tests
run: npm test
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: 'YOUR_PROJECTNAME'
directory: 'YOUR_STATIC_FILES_DIRECTORY'
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
You'll need to get CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID from the Cloudflare Dashboard and add them to the Github secrets, it already has access to GITHUB_TOKEN Been working great for me, deploys any master merges to production and any other branches to preview.
3 replies
CDCloudflare Developers
Created by stukennedy on 9/26/2023 in #pages-help
Deploying Preview & Production
okay I figured this out ... seems that Github actions automatically send the branch name through when calling deploy, so anything on master gets to production and anything on another branch gets to preview voila!
2 replies
CDCloudflare Developers
Created by peachneo on 9/19/2023 in #pages-help
Github integration after deploying with Wrangler
I'm having the same issue ... trying a few approaches. Just posted my own question on this. I'm also struggling with the Github branches thing even if you setup a new project.
3 replies
CDCloudflare Developers
Created by stukennedy on 3/10/2023 in #pages-help
Intermittent problem routing in local dev
stopped happening since I used the default port for dev
3 replies
CDCloudflare Developers
Created by stukennedy on 3/10/2023 in #pages-help
Intermittent problem routing in local dev
it may be related to the fact I forced it to use port 3000
3 replies