From 8016d039e8c1d424c6f726e3ac3fc0b8d72db4eb Mon Sep 17 00:00:00 2001 From: Maciej Niemcewicz Date: Thu, 28 Mar 2024 15:46:21 +0100 Subject: [PATCH] cleanup and fixes --- .../workflows/{deploy.yml => cloudflare_worker.yml} | 8 +------- README.md | 13 +++++++++++-- 2 files changed, 12 insertions(+), 9 deletions(-) rename .github/workflows/{deploy.yml => cloudflare_worker.yml} (86%) diff --git a/.github/workflows/deploy.yml b/.github/workflows/cloudflare_worker.yml similarity index 86% rename from .github/workflows/deploy.yml rename to .github/workflows/cloudflare_worker.yml index f3d2fe9..2740101 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/cloudflare_worker.yml @@ -1,7 +1,5 @@ -name: Deploy Worker +name: Deploy Cloudflare Worker on: - push: - pull_request: repository_dispatch: workflow_dispatch: @@ -28,13 +26,9 @@ jobs: npm install -g flotiq-cli flotiq import . $GATSBY_FLOTIQ_API_KEY fi - - run: npm install -g gatsby-cli - # - run: flotiq import . $GATSBY_FLOTIQ_API_KEY - run: yarn install - run: gatsby build - # env: - # GATSBY_FLOTIQ_API_KEY: ${{ secrets.GATSBY_FLOTIQ_API_KEY }} - name: Build & Deploy Worker uses: cloudflare/wrangler-action@v3 with: diff --git a/README.md b/README.md index fe8d396..addfaa3 100644 --- a/README.md +++ b/README.md @@ -112,7 +112,10 @@ Or to [Netlify](https://www.netlify.com/): [![Deploy](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/flotiq/flotiq-gatsby-event-1) -Or [![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/mniemcewicz/flotiq-gatsby-event-1) +Or to [Cloudflare Workers](https://workers.cloudflare.com/): + +[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/mniemcewicz/flotiq-gatsby-event-1) + ## What's inside? A quick look at the top-level files and directories you'll see in a Gatsby project. @@ -144,6 +147,8 @@ A quick look at the top-level files and directories you'll see in a Gatsby proje ├── README.md ├── static.json ├── tailwind.config.js + ├── worker-index.js + ├── wrangler.toml └── yarn.lock 1. **`.flotiq`**: This directory contains content types necessary to starter to work. @@ -198,7 +203,11 @@ A quick look at the top-level files and directories you'll see in a Gatsby proje 26. **`tailwind.config.js`**: Configuration file for tailwind. -27. **`yarn.lock`**: This is an automatically generated file based on the exact versions of your yarn dependencies that were installed for your project. **(You won’t change this file directly).** +27. **`worker-index.js`**: Main file for Cloudflare Workers. + +28. **`wrangler.toml`**: Configuration file for Cloudflare Workers deployment. + +29. **`yarn.lock`**: This is an automatically generated file based on the exact versions of your yarn dependencies that were installed for your project. **(You won’t change this file directly).** ## Learning Gatsby